trying stuff and setting up auto

This commit is contained in:
talksik
2022-05-28 03:08:25 -05:00
parent 2def3fde91
commit c21c80b8f7
6 changed files with 216 additions and 4 deletions
@@ -0,0 +1,18 @@
import Channels, { STORE_ITEMS } from './constants';
import ElectronGoogleOAuth2 from '@getstation/electron-google-oauth2';
import { browserWindow } from '../index';
const myApiOauth = new ElectronGoogleOAuth2(
'423533244953-banligobgbof8hg89i6cr1l7u0p7c2pk.apps.googleusercontent.com',
'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',
[''],
{ successRedirectURL: 'http://localhost:3000/auth/success' },
);
// FRESH GOOGLE LOGIN
export async function handleGoogleLogin() {
const tokens = await myApiOauth.openAuthWindowAndGetTokens();
browserWindow.webContents.send(Channels.GOOGLE_AUTH_TOKENS, tokens);
}