Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Commit

Permalink
Update use-google-login.js (#398)
Browse files Browse the repository at this point in the history
Access token can be consistently got as part of the top level response like so
const { access_token } = response.getAuthResponse(true);
  • Loading branch information
smarajitdasgupta authored Nov 21, 2020
1 parent f1ed849 commit f2a26d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/use-google-login.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const useGoogleLogin = ({
offer renamed response keys to names that match use
*/
const basicProfile = res.getBasicProfile()
const authResponse = res.getAuthResponse()
const authResponse = res.getAuthResponse(true)
res.googleId = basicProfile.getId()
res.tokenObj = authResponse
res.tokenId = authResponse.id_token
Expand Down

0 comments on commit f2a26d4

Please sign in to comment.