-
Hello, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
Hi, to use calendar API add the relevant scope with a custom button. Once you obtains the token, use it with firebase for IDP https://firebase.google.com/docs/auth/web/google-signin#expandable-2 |
Beta Was this translation helpful? Give feedback.
-
As @kasvith instructed, you can use a custom button using useTokenClient to specify the calendar scope. Then, authenticate to Firebase using const handleOnSuccess = (response: AuthCodeFlowSuccessResponse) => {
const credential = GoogleAuthProvider.credential(null, response.access_token);
const result = await signInWithCredential(getAuth(), credential);
// then do what you want with the result e.g.
const user = result.user;
}; |
Beta Was this translation helpful? Give feedback.
As @kasvith instructed, you can use a custom button using useTokenClient to specify the calendar scope. Then, authenticate to Firebase using
GoogleAuthProvider.credential
: