Hi guys, any example of declaring custom redirect_...
# support-questions-legacy
g
Hi guys, any example of declaring custom redirect_uri while initialising third party providers in golang?
r
Hey. @sattvikc can help here.
s
sure
@ggi_d you can do something like this. let me know if u face any issues
g
Thanks so much! This was helpful 👍
s
happy to help 🙂
g
Also if we're using JWT, what should be the key of the header on which we send the token? I see that I have two tokens on the frontend, namely : Front-Token and Id-Refresh-Token
s
@rp_st ?
r
You can send it with whatever key you like.. you will be consuming the token yourself somehwere
g
I already implemented this, able to intercept any query param but how do query for a specific provider?
s
I'm on it, will let u know in a while
Let me know if this helps
g
so do I have to maintain a mapping of my own with client_ids and redirect uris for this?
s
yes
g
oh okay
So the authurl endpoint returned the correct redirect uri, but when redirecting to the server it added these scopes that I had in a different provider
Also the endpoint gives me a 404
Copy code
redirect_uri_web_app := struct { Params map[string]interface{} }{Params: map[string]interface{}{"redirect_uri": Config.GetEnvSecret("BASE_API_URL") + "/auth/google/webAppcallback"}}
    var googleWebAppProvider = thirdparty.Google(tpmodels.GoogleConfig{
        ClientID: Config.GetEnvSecret("GOOGLE_CLIENT_ID"),
        ClientSecret: Config.GetEnvSecret("GOOGLE_CLIENT_SECRET"),
        AuthorisationRedirect: &redirect_uri_web_app,
        Scope: default_scopes,
        IsDefault: true,
    })
this is how i registered the redirect uri
s
can u see what scope was returned with GetAuthURL API?
g
I think the scopes are all the scopes associated with that particular cloud console project
the api returns correct scopes
s
are u getting those additional scopes on the callback from google?
g
yes
s
not very sure of that, let me check
g
these are the debug logs, not sure why it says no recipe matched
s
callback is not handled by the backend
it's handled in the frontend and then there is a call to the SignInUp API
g
but I'm declaring the redirect uri on the backend
s
u mean, are u specifying a backend url for the redirect uri?
g
yes, should it be the website one? and if it's the website one, how will the frontend know? do we need to specify it in the config as well for react?
s
are you using our react sdk ?
it should be the website one. supertokens react SDK will handle it. there is no need to specify. You also need not override the redirect URI, it's automatically determined from the supertokens config
g
yes
Hi @sattvikc @rp_st is it possible to get on a short call, struggling with a weird issue
I'm unable to redirect the user to /auth/ endpoints on the frontend but am able to redirect to any other endpoint
s
on the frontend?
g
yes
s
@rp_st can help?
g
if the code/state is exchanged on the frontend, doesn't that mean we have to store the client secret as well on the frontend?
if not, then it must go to the backend, but can't find an endpoint that does this
or are we supposed to handle the callback on the backend ourselves, and then register a user with provided functions from supertokens?
r
hey @ggi_d im available for a call now
Join Zoom Meeting https://us06web.zoom.us/j/83472125568?pwd=WVZkYWxDZkZBY3hHSVFhemhLZ2M2Zz09 Meeting ID: 834 7212 5568 Passcode: 609355 One tap mobile +12532158782,,83472125568#,,,,*609355# US (Tacoma) +13017158592,,83472125568#,,,,*609355# US (Washington DC) Dial by your location +1 253 215 8782 US (Tacoma) +1 301 715 8592 US (Washington DC) +1 309 205 3325 US +1 312 626 6799 US (Chicago) +1 346 248 7799 US (Houston) +1 386 347 5053 US +1 564 217 2000 US +1 646 931 3860 US +1 669 444 9171 US +1 669 900 6833 US (San Jose) +1 719 359 4580 US +1 929 205 6099 US (New York) Meeting ID: 834 7212 5568 Passcode: 609355 Find your local number: https://us06web.zoom.us/u/kdrzVpprGw
lmk when you can join
g
hi, i can join now
r
ok
sending new link.. the older one is invalid
hey @ggi_d as discussed, please open an issue on our github highlighting the problem and what you want - we will investigate this over the coming days.
@ggi_d we have fixed this issue in the latest golang SDK. Now the open ID token will contain the user's profile info like their name and profile pic. All you need to do is updated the backend SDK
90 Views