-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Where does googleUser
come from?
#256
Comments
I'm having the same issue. I've looked for hours on the docs and on the internet and had no luck :( |
I think the documentation should be updated. The export const handleGoogleSignIn = async (): Promise<any> => {
return new Promise<any>((resolve, reject) => {
const script = document.createElement('script');
script.src = 'https://apis.google.com/js/api.js';
script.onload = () => {
console.log('Google API script loaded.');
(window as any).gapi.load('client:auth2', {
callback: () => {
(window as any).gapi.auth2.init({
clientId: authClientId,
}).then(() => {
(window as any).gapi.auth2.getAuthInstance().signIn().then((googleUser: any) => {
resolve(googleUser); // Resolve with googleUser
}).catch((error: Error) => {
reject(error);
});
}).catch((error: Error) => {
reject(error);
});
},
onerror: (error: Error) => {
reject(error);
}
});
};
script.onerror = (error: Event | string) => {
console.error('Error loading Google API script:', error);
reject(error instanceof Error ? error : new Error('Unknown error loading Google API'));
};
document.body.appendChild(script);
});
}; Once, you get the
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
snippets-web/snippets/auth-next/google-signin/auth_google_checksameuser.js
Line 15 in 1c4c683
I know that
firebaseUser
comes from this (result.user
):But where does
googleUser
come from?The text was updated successfully, but these errors were encountered: