Error from apple connection: (no description) (undefined)

I’m getting this error when try to exchange successfuly fetched apple authorization code by auth0 token.

Error message is “Error from apple connection: (no description) (undefined)”
Next time I try to use the same authorization code I will get expected error that invalid_grant.

Here is auth0 log item (omitted sensitive data)

{
“type”: “fens”,
“description”: “Error from apple connection: (no description) (undefined)”,
“connection”: “apple”,
“details”: {
“subject_token_type”: “http://auth0.com/oauth/token-type/apple-authz-code
},
“user_id”: “”,
“user_name”: “”
}

Can someone support in this please?

1 Like

I get this same error in my react-native app… I have a support ticket open about it now. Did you figure it out?

Hey there everyone!

One of our developer support engineers is for sure on your ticket by now @MaxSchmeling. So as not to multiply efforts can you share the solution here in the thread once they share it with you? Thanks!

Yes, I’ve been talking with Matt MacAdam about my support ticket, and he has “a ticket in with engineering”. I’m still waiting to hear back on that.

I will definitely post back here when this is resolved.

For now, I’m working on exchanging the authorization code for a token with Apple directly to see if I can get any more clarity about the error that way.

I’m following the directions here because I assume this is the endpoint that Auth0 is calling with the authorization code, but I don’t know for sure: Apple Developer Documentation

Hi folks,

Thanks for the feedback and I’m sorry this issue is taking so long to address. I’ve added @Knight704’s experience to the engineering ticket and I’m trying to get some action on it.

Thanks,

Matt

1 Like

Let us know Matt once you have any updates from Engineering Team on that!

I was able to figure it out.

I’m using the @invertase/react-native-apple-authentication package in a react-native application. The performRequest method that starts the Apple ID flow has a nonceEnabled parameter that defaults to true. The nonce is what was causing the issue. Setting nonceEnabled to false allows Auth0 to exchange and validate the authorization code.

2 Likes

@MaxSchmeling That makes sense–we don’t know the nonce so it’s correct for Apple to reject the exchange without it. I am having engineering look into if there is a message to that effect from Apple and if we can pass that on to our users to make troubleshooting easier.

@Knight704 Does this solution apply to you? Are you sending a nonce when you request the authorization code from Apple?

Thanks,

Matt

Thanks for sharing it with the rest of community @MaxSchmeling!

I am having the exact same problem, even if i did the nonceEnbled: false.
Any ideas?

Hey there @pantelis!

Our engineering team is still looking into that. As soon as we have any update we’ll share it with you!

I’ve managed to solve it. The problem was the encoding of the request. I used the axios library which seems to have a bug with urlencoded parameters. So i had to stringify the body first, before sending the data to the request. The nonce has to be false as mentioned, thanks for that!

The following tutorial may be helpful:

1 Like

Perfect thanks for sharing it with the rest of community! Glad you have figured it out!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.