Flutter SDK Social Login is Broken on Farsi Android

I tried posting this on the github issues page but kept getting an error.

We were getting a strange error from a user unable to sign-up/in using Google. Upon investigation, we figured out the issue seems to be that the user’s Android phone local language is configured to Farsi.

We were able to reproduce this error by changing the Android emulator’s language to Farsi by going to the Settings > Language and then adding Farsi then moving it as the top language and observing the entire system settings turning Farsi.

What seems to be happening, is that auth0 is returning the expiry token as a Farsi string rather than an English string or epoch time and then the auth0 flutter SDK cannot parse it as it’s using a simple Datetime.Parse, and thus the login process fails for the user. We’re not setting any language or locale parameters on our end, so it seems the user phone’s locale is somehow being passed through implicitly to the auth0 backend and is being used to format the datetime string, despite the calling side from the client having no provisions to handle a localized datetime for the expiry token.

This is the stack trace of the exception in the auth0 flutter SDK: