Closed erdzan12 closed 10 months ago
Hi @erdzan12, thanks for raising this, and apologies for the delay.
I've been a bit busy and was unable to take a look at this yet, will try to get back before the end of the week.
Hi @erdzan12,
The Swift layer expects the date passed to expiredAt
to be UTC. This is already the case for dates that come from the Swift layer (e.g. automatic save to Keychain after Web Auth), but in this case, you're supplying your own Dart date object.
This should be handled by the SDK's Dart layer anyway (I'll look into this with more detail and test a possible solution), but as a workaround make sure to call toUtc()
on your date object before passing it to Credentials
.
thanks
Checklist
Description
It looks like the CredentialsManagerSaveMethodHandler has a bug when trying to decode the Credentials class from the input in here https://github.com/auth0/auth0-flutter/blob/main/auth0_flutter/ios/Classes/CredentialsManager/CredentialsManagerSaveMethodHandler.swift#L13C23-L13C23 It always throws this error:
When updating the class to:
It seems to work.
Here is how in the Pod (Auth0) the Credentials are decoded:
Additionally, we pass in
expiredAt
, even thoughexpiredIn
is required, is this intended?Here is also another user stating the same issue: https://community.auth0.com/t/flutter-native-apple-sign-in-using-custom-ui/114027
Reproduction
Try to save some Credentials with the default credentialsManager like this:
Additional context
No response
auth0_flutter version
1.2.1
Flutter version
3.13.2
Platform
iOS
Platform version(s)
No response