Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const signInWithGithub = () => new Promise((resolve) => {
hellojs.init({
github: GITHUB_CLIENT_ID,
}, {
oauth_proxy: `${API_URL}/oauthproxy`,
});
hellojs
.login('github')
.then(auth => {
hellojs(auth.network).api('/me').then(user => {
resolve({
user: {
access_token: auth.authResponse.access_token,
...user,
},
});
});
}, err => resolve({ error: err.error }));
});
signIn = async () => {
await hello.login('azureAD');
}