https://supertokens.com/ logo
Title
d

dbottisti

03/06/2023, 1:37 PM
Hello. I'm trying to integrate Google as a Third-Party provider and I've specified the
scope=['email', 'profile', 'openid']
on my FastAPI backend. However, I'm not sure how I can access the information in the profile on the backend. Any suggestions?
r

rp

03/06/2023, 8:51 PM
Hey @dbottisti
There is a section in the docs about getting the access token that google provides. You can use that to query google to get the info you need
d

dbottisti

03/06/2023, 9:00 PM
Will that work if I've created a custom
GoogleWithIdToken
Provider (extending the Google Provider) and I was provided an
id_token
instead of a
code
?
r

rp

03/06/2023, 9:01 PM
It should. Yea.
d

dbottisti

03/06/2023, 9:08 PM
Hmm, when I try that, the value of
thirdparty_auth_response["access_token"]
is
use-id-token
, the value I submitted in the POST request (since I provided
id_token
instead)
r

rp

03/06/2023, 9:09 PM
I think you would need to create your own custom provider for this. This should be easy enough.
See the section on custom provider
d

dbottisti

03/06/2023, 9:10 PM
Yea, I did that.