for apple social login... i see the following in ...
# general
c
for apple social login... i see the following in our Go service.
r
Maybe @sattvikc can help out.
Hey @CG.VOLS when you said that you saw a 404 on the browser and then 200, what does that mean? Could you please elaborate?
c
shows what i was talking about
s
can u ping me the url of apple 404
apple state/code seems fine, however signinup has failed. can you check if the apple login settings are accurate? else we can debug and see what's going on
c
https://dev.wwwww.us/services/auth/v1/callback/apple ty we tweaked the path by injecting "services". that is for k8s routing. /auth/v1 is the api base path it's ok for state to not have a value? https://dev.wwwww.us/callback/apple?state=&code=c209f066b40054a20944e1b21e6661f59.0.mruxx.e52D85TBP-Titom-vr8eDg
thank you...
s
can u show the response of 404 page ?
r
Which URL returns a 404? And what is the response body from that network call?
c
those are the response headers for that call
r
and what is the response body?
c
nothing.
r
I see
Can we see the raw response?
c
i don't see a response in the browser. should there be one with the 404?
r
Or rather, can we get on a call to debug call?
It's easier to debug that way
c
yes. let me check with a couple folks on our side. would be best if we do it all together as they can tweak things as needed
r
sounds good!
You can book a call here too if you like: https://supertokens.com/call-user
c
can we zoom now if i provide a link?
r
sure
s
@CG.VOLS are you using a Mux in the golang server? if yes which one?
r
Also, we could reproduce the 404 error on our side, we are investigating the issue. Will release a new version with the fix as soon as possible
@CG.VOLS i have released a new version of the golang SDK (v0.8.1) which fixes the 404 issue.
c
awesome!!!
hey @rp... can we have another call once i come free in like 20-30 min. we are seeing an interface issue. want your feedback.
r
Hey! I am busy now, can we have a call tomororw?
You can pick a time here: https://supertokens.com/call-user
c
later today?
if not we can set up tomorrow
r
today seems difficult
c
k. we'll do tomorrow
what timezone are you?
r
IST
c
cool.
i may get Alisha and Santhosh to reach out to you sooner in your day
r
okay
c
ty
r
You can even describe the issue here and if i get time today, i'll reply
otherwise tomorrow is fine
c
the code is now looking for a id_token from apple.
claims, err := verifyAndGetClaimsAppleIdToken(authCodeResponse.(map[string]interface{})["id_token"].(string), api.GetActualClientIdFromDevelopmentClientId(config.ClientID))
that is in apple.go
not sure where we get that token
r
You get that from the response that comes from apple when you give it the code
c
@rp hey... we are coming back to this issue. i got a new IP for the k8s worker node and get a different error now when i do wget from the pod. we can't run local to see what the error is coming back from Apple as they won't allow us to configure localhost.
is there a way to get more debug information coming back from this call?
accessTokenAPIResponseTemp, err := postRequest(providerInfo, userContext) if err != nil { return tpmodels.SignInUpPOSTResponse{}, err }
r
You could override the
signInUpPOST
function, call the original implementation which would return the
err
, and then print it out
c
@rp it was already overriden. from Alisha, "its causing panic inside resp, err := f() , so we are not able to see the logs"
r
oh. So then you can override it, and instead of calling the original implementation, you can copy the code from here: https://github.com/supertokens/supertokens-golang/blob/master/recipe/thirdparty/api/implementation.go#L95 And then see how it goes.
What is the panic error again?
Is this for web login with apple or mobile?
If it's a mobile request, what is the API call input?
c
web
looking at the above code
c
i think i see
r
and see what the value of
authCodeResponse
is?
c
we can't run it locally
r
So locally it all works?
c
because of apple config
apple won't call back to localhost
this is deployed to our dev env
from the github link you posted above
r
ok. Can you then copy this file https://github.com/supertokens/supertokens-golang/blob/0.8/recipe/thirdparty/providers/apple.go#L86 into your code base and add this as a custom provider on the backend? As opposed to using our pre built apple rprovider?
c
on the UI, when we get a redirect url back. we override it.
we override that value because of k8s routing issues
in the github link... it look slike the redirect uri gets override on the server side
r
ah right. That may be the problem
How are you changing the redirect_uri?
c
doing a replace of the URL param value for redirect_uri
that is probably the issue
r
and what are you replacing it with?
c
one sec
i'll grab it
r
vs what is the redirect_uri by default?
vs
services allows it to route to our service
r
I see. To solve this, can you set the apiGatewayPath config on your backend (in appInfo) to
/services
And on the frontend, you should set the apiBasePath to
/services/auth/v1
On the backend, set the apiBasePath to
/auth/v1
This way, you shouldn't have to rewrite the redirect_uri either. And it should just work - if I understand your setup correctly.
c
ok. we'll give this a try.. apiGatewayPath as the name sounds accounts for any routing needs ?
c
ty 🙂
r
lmk if this solves the issue
c
i think this may do it. it didn't occur to me that the redirect uri was dynamic
or could be reset after we set it as well
r
Yea. Fair enough.
c
i need to read more documentation lol
thx again. we'll try it out
r
Hehe. Well.. reading docs is boring. Writing them even more so 😂