Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Credentials on Android have incorrect expiresAt value #427

Closed
6 tasks done
aluu4445 opened this issue Mar 28, 2024 · 1 comment · Fixed by #469
Closed
6 tasks done

Credentials on Android have incorrect expiresAt value #427

aluu4445 opened this issue Mar 28, 2024 · 1 comment · Fixed by #469

Comments

@aluu4445
Copy link

Checklist

Description

When I login on Android, the returned Credentials object has an expiresAt value that is off by 7 hours.

Here is the relevant code snippet from the sample app with a print statement that I added:

      final result = await webAuth.login(
        redirectUrl: dotenv.env['AUTH0_REDIRECT_URI'],
        audience: dotenv.env['AUTH0_AUDIENCE'],
      );

      setState(() {
        _isLoggedIn = true;
      });

      output = result.idToken;
      print(result.expiresAt.difference(DateTime.now()));

I would expect this to be close to my access token lifetime of 5 minutes.

Here is the printed value that I get: -6:55:01.311274

Reproduction

  1. Login on Android
  2. Read the expiresAt value in the returned Credentials object
  3. Observe the difference between the expiresAt value and DateTime.now()

Additional context

No response

auth0_flutter version

1.6.0

Flutter version

3.16.9

Platform

Android

Platform version(s)

No response

@gferon
Copy link
Contributor

gferon commented Sep 9, 2024

It looks like this is related to #469

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants