How to get Google auth code parallelly with 'profileObj' and 'tokenObj' using"react-google-login" tool?

Viewed 385

I am using react-google-login (https://www.npmjs.com/package/react-google-login) tool to sign in with Google. There are some issues:

  • GoogleLogin gives me two type of object: profileObj and tokenObj. In 'tokenObj' I can get access_token and so on.
  • If I use accessType = 'code' I can get the auth_code. But this prevents me getting the profileObj and tokenObj.
  • Documentation says if use accessType = 'permission code' then I can get both the tokenObj and auth_code. But its not true. This is not happening.

Now I want to get both tokenObj and auth_code.

Is it really possible to do so? How can I get the auth_code parallelly with profileObj and tokenObj?

0 Answers
Related