https://supertokens.com/ logo
Title
g

ggishant

10/03/2022, 12:43 PM
How do I get the session scopes from the session.GetSessionFromRequestContext(r.Context()) object in golang?
By scopes I mean the third party scopes
r

rp

10/03/2022, 12:45 PM
you mean the user's info from the third party (for example google)?
g

ggishant

10/03/2022, 12:46 PM
Yes
info like scopes granted, and profile image?
r

rp

10/03/2022, 12:46 PM
you can do that in the post sign up part with the access token that we provide. And then save that info in the user metadata recipe or in your own db
which recipe are you using? I can send you the right docs link
g

ggishant

10/03/2022, 12:47 PM
we'll only be using social logins for now.
One more question?
Sure.
g

ggishant

10/03/2022, 12:50 PM
https://github.com/supertokens/supertokens-golang/blob/master/examples/with-mux/main.go The example has multiple instances thirdparty.Google providers. We also have multiple providers like this. When I make a GET request to /authroisationurl , it always returns the value for isDefault:true
there must be an identifier for me to send to get that particular providers auth url
r

rp

10/03/2022, 12:54 PM
This is a known issue. The authorisationurl GET doesn't have any such param, but the signinup API call allows you to pass in an optional clientID using which it picks the right provider. Until this is solved, you can override the authorisationurl get in (https://pkg.go.dev/github.com/supertokens/supertokens-golang@v0.9.4/recipe/thirdparty/tpmodels#APIInterface), and call the original implementation with the right provider based on the input query param (you can define your own custom input param)
g

ggishant

10/03/2022, 12:56 PM
ok thanks. sorry to keep you, but i have another question?
Hey thanks for the help. I'll try some things out and get back
🫡
r

rp

10/03/2022, 12:57 PM
ok! Feel free to ask questions though
g

ggishant

10/03/2022, 12:58 PM
sure!! 🙂