Flutter native apple sign in using custom ui

Hi there

I’m trying to implement Sign in with apple in flutter using the auth0 flutter library and the sign_in_with_apple package. I’ve successfully obtained an authorizationCode and exchanged it to auth0 tokens (access, id and refresh) as well as a UserProfile.

All that is left is to create a Credentials object and store it using the CredentialsManager exposed by the auth0 flutter api. I can create the object just fine, but when I try to save with with storeCredentials, I’m met by an error:

CredentialsManagerException (SWIFT_REQUIRED_ARGUMENT_MISSING: The required argument 'credentials' is missing or has the wrong type.)

I feel like I’ve hit a wall here, and would greatly appreciate any help you might have :slight_smile:

Thanks in advance!

No one who have implemented native login with apple in flutter?

1 Like

Hey there @Lasse-Fisker sorry for the delayed response on this one!

I’m unfortunately not sure what the issue could be regarding the exception, but have you by any chance attempted to enable native sign in with Apple via application settings in Auth0?

Keep us posted!

hi @tyf thanks for replying, no worries about the delay :slight_smile:

native sign in with apple is enabled yes. The strange thing is that I can successfully obtain a valid access token using the apple sign in and auth0 token exchange (tested this against my auth0 protected api). The error happens when trying to save the credentials locally on the native device using the auth0 flutter package.

Maybe the question would be better suited for an auth0 flutter github issue?

1 Like

Hey @Lasse-Fisker thanks for clarifying!

Yes, I recommend opening up a GH issue agains the SDK itself - That is odd that you can get the token(s) but not save :thinking:

1 Like

Super, I will open an issue on the repo. Thanks for the confirmation that it should work, It’s probably some edge case quirk. :slight_smile:

1 Like

Hi, I have the same issue, were you able to solve the issue or to create a github issue?

I created an issue here describing a fix

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