auth0 / auth0-flutter

Auth0 SDK for Flutter
https://pub.dev/documentation/auth0_flutter/latest/
Apache License 2.0
61 stars 41 forks source link

"Invalid date format" bug #258

Closed Nirajn2311 closed 1 year ago

Nirajn2311 commented 1 year ago

Checklist

Description

If a user with a system language other than English tries using social login method(I've tested it with Google only), they are not logged in as the expiresAt value cannot be parsed due to it being in the system language. For example, if your mobile is set to use Arabic then the package tries parsing an arabic value. The ideal solution would be to parse the datetime while keeping in mind of a different locale being used by the system.

Reproduction

  1. Clone the example app
  2. Change your phones language
  3. Use a social login method through the web
  4. See the error logged in console along with the datetime

auth0_flutter version

1.1.0

Flutter version

3.7.12

Platform

Android, iOS

Platform version(s)

Latest

stevehobbsdev commented 1 year ago

Thanks for raising. Seeing as you mention an example with Arabic, we have #238 that may fix this. Does the solution proposed in that PR look like it would solve your issue?

Nirajn2311 commented 1 year ago

Yes that PR fixes this issue. Hope it gets merged soon.