|
Hello, |
Answered by
ap-1
Oct 5, 2022
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 |
11 replies
|
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;
}; |
1 reply
Answer selected by
kasvith
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As @kasvith instructed, you can use a custom button using useTokenClient to specify the calendar scope. Then, authenticate to Firebase using
GoogleAuthProvider.credential: