https://supertokens.com/ logo
#support-questions
Title
# support-questions
s

SDavies

01/12/2023, 9:23 PM
Hi, I'm using the Supertokens Go SDK and I'm running into a panic when logging users in with Apple. Google and Facebook are working fine, and all 3 are working with our website. But apple isn't working when users log in in our react-native mobile app. Here's the panic:
Copy code
[info] 2023/01/12 21:14:24 [Recovery] 2023/01/12 - 21:14:24 panic recovered:
[info] interface conversion: interface {} is nil, not string
[info] runtime/iface.go:262 (0x557de46c7a49)
[info] github.com/supertokens/supertokens-golang@v0.9.7/recipe/thirdparty/providers/apple.go:86 (0x557de4c39d89)
[info] github.com/supertokens/supertokens-golang@v0.9.7/recipe/thirdparty/api/implementation.go:135 (0x557de4c34775)
[info] github.com/supertokens/supertokens-golang@v0.9.7/recipe/thirdpartypasswordless/api/implementation.go:34 (0x557de4d1acbb)
...
Looking at the code on Github, it looks like
authCodeResponse["id_token"]
is
nil
. I'm wondering if anyone has run into a similar issue and if it's obvious to anyone what I'm doing wrong. I'm overriding both the API endpoint and function for third party signin/up (but it looks like it's panicking before making it to my function override) if that makes a difference.
It's happening even when I don't override the API
s

sattvikc

01/13/2023, 5:34 AM
could you share the request body being sent to the SignInUp API ?
s

SDavies

01/13/2023, 6:38 PM
I can share it with some redactions:
Copy code
{
  "clientId": "<MY_APPLE_CLIENT>",
  "code": "<THE CODE I GOT FROM APPLE>",
  "thirdPartyId": "apple",
  "redirectURI": "https://example.com/redirect"
}
I have verified the clientId is not the problem, and the redirect domain and URL are added to my service ID in the apple developer dashboard
s

sattvikc

01/16/2023, 3:52 AM
okay, could u also verify if you are using the right teamId, keyId and privateKey? Also, please ensure that the redirectURI for apple is "/auth/callback/apple" we don't allow any other redirect URI at the moment