Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@getstation/electron-google-oauth2
Advanced tools
A Google OAuth2 module for your Electron app.
Library that manages Google OAuth2 authentication for your Electron app.
// npm
$ npm install --save @getstation/electron-google-oauth2
// yarn
$ yarn add @getstation/electron-google-oauth2
import ElectronGoogleOAuth2 from '@getstation/electron-google-oauth2';
app.on('ready', () => {
const myApiOauth = new ElectronGoogleOAuth2(
'CLIENT_ID',
'CLIENT_SECRET',
['https://www.googleapis.com/auth/drive.metadata.readonly']
);
myApiOauth.openAuthWindowAndGetTokens()
.then(token => {
// use your token.access_token
});
});
import ElectronGoogleOAuth2 from '@getstation/electron-google-oauth2';
app.on('ready', () => {
const myApiOauth = new ElectronGoogleOAuth2(
'CLIENT_ID',
'CLIENT_SECRET',
['https://www.googleapis.com/auth/drive.metadata.readonly']
);
const refreshToken = \\ Read the saved refresh token
if(refreshToken) {
myApiOauth.setTokens({ refresh_token: refreshToken });
} else {
myApiOauth.openAuthWindowAndGetTokens()
.then(token => {
// save the token.refresh_token secured to use it the next time the app loading
// use your token.access_token
});
}
});
const myApiOauth = new ElectronGoogleOAuth2(
'CLIENT_ID',
'CLIENT_SECRET',
['https://www.googleapis.com/auth/drive.metadata.readonly']
{ successRedirectURL: 'https://google.com' },
);
const ElectronGoogleOAuth2 = require('@getstation/electron-google-oauth2').default;
new ElectronGoogleOAuth2(CLIENT_ID, CLIENT_SECRET, SCOPES_LIST);
MIT
FAQs
A Google OAuth2 module for your Electron app.
We found that @getstation/electron-google-oauth2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.