Get a token from gapi
I followed this link and made a google login test page by gapi
. He worked and returned profile details.
I have tried this passport .js evaluation before, but due to a snippet of the problem , I was unable to get it to work.
In the evaluation, passportjs
we can receive token
. Does anyone know how we can get token
on gapi
?
Also, does anyone know why we don't need to specify the secret in the code gapi
?
+3
source to share
1 answer
You can get the token in AuthResponse .
You also need an API key for gapi:
gapi.client.init({
'apiKey': 'YOUR_API_KEY',
...
})
0
source to share