Hi, I got a problem with apple login. Just to clarify my code with apple login works on a one enviro...
d
Hi, I got a problem with apple login. Just to clarify my code with apple login works on a one environment with a set of client-id, key-id and client-secret but on another environment with a different set of client-id, key-id and client-secret the same code fails and i try to understand why maybe you will have some info to share. Im using Go as my backend. The sign in with apple id seems to work but when im redirected it fails in the backend on
signinup
api with a panic error of
interface conversion: interface {} is nil, not string
I've attached the logs to the message, they are supertokens logs mix with some of my app. My guess is it could be my configuration is wrong but i dont see any problem with it.
r
hey @Diesel
so just to clarify, you have two configs for apple on the backend?
so you give apple twice in the provider's list?
d
hey @rp_st no its 2 different instances on different environments. using one config on each instance. on one env the configuration is working on another its not. trying to understand what im missing.
r
I see.
d
the configuration is also different between them
r
@sattvikc can help here
s
sure
@Diesel could u help me with the working and not working supertokens.Init code ?
also if u have line number of the panic, plz do share that as well
file & line number I mean
d
the code for the supertokens.init is the same just the apple provider config is different specifically the client-id, client-secret and key-id. from the panic message if i understand correctly it happens in
apple.go
under the packages
recipe.thirdparty.providers
line 87. using version 0.7.2 of the Go sdk.
s
sure, let me check and get back
is this web app or mobile app ?
d
web
s
when the redirect happens are you getting back code in the url?
maybe a screen shot of network inspect can help here. there seems to be an issue with exchanging code for oauth tokens in this scenario.
if you are receiving the code, we can do a debugging session over a call to figure out the exact problem
d
yes just give me a few minutes i will screenshot the network.
i think i did see a code and a state being passed but ill test it now again
@sattvikc any specific network call u want to see?
s
if u confirm code & state are present, that's enough
d
ok give me a sec and i will confirm it again just to be sure
yes i see the web client is being called to the callback/apple with a state and a code. and after that the signinup of the server is called with the same code, a redirectURI to the web client callback/appple and thirdPartyId apple.
s
ok, that mostly means there is an issue with the config.
we can do a debug session on call to find out the exact error
d
sounds good im available from 14:00 UTC to like 18:00 UTC
is there anything else we need to define for apple login other than app id and a service and key that are connected to that app?
s
you must be configuring all of these
d
yes i have all of these configured
s
I have DM'ed you, plz check
@Diesel were you able to get it to work after our discussion of Friday?
d
so far no luck
s
can we have another look over the call, look at your setup... both the working and the not working one?
d
yes we can but im on a holiday for the next 2 weeks so im not sure when i will have time. i will let you know when i can.
s
sure
d
Hey @sattvikc sorry for the delay it was a long holiday but i still had time to play with this a little bit during the holiday. The problem still exists after all this time so it aint something with the keys. So I did tried to do this handshake on my own with the browser and postman using this guide that you have in your docs https://medium.com/identity-beyond-borders/how-to-configure-sign-in-with-apple-77c61e336003 and it appears its working correctly. Can we sit again about this issue and understand what is missing in supertokens?
s
sure
let me know your comfortable time
d
we can do something tomorrow? between 2pm - 5pm IST?
s
yes, works for me
d
ill send u an invite 👍
s
received
4 Views