Skip to content

how to access the refresh token if my app idle for about half an hour without refreshing the page. #101

Open

Description

@erwin-d-austria

I have an app that validates token from backend. If my app idle for about an hour, the validation trigger for valid token.. Is there a way to get a refresh token without refreshing the page?

Activity

  1. qt-pixels commented on Mar 25, 2020

    @qt-pixels

    Bump!

  2. jka1010 commented on May 26, 2020

    @jka1010

    any updates on this issue ? pl share

  3. saikumarkunchaa commented on Jun 25, 2020

    @saikumarkunchaa

    If you find any solution , please comment here @erwin-d-austria

  4. aamay001 commented on Aug 5, 2020

    @aamay001

    There's a method named adalGetToken in the library. You can call it to renew the token from anywhere. @jka1010 @saikumarkunchaa @qt-pixels @erwin-d-austria

  5. foxxor commented on Oct 22, 2020

    @foxxor

    For anyone in this same situation, as @aamay001 mentioned there's an undocumented method adalGetToken(AuthenticationContext, resource) you can use to silently refresh the token. Given that the library doesn't refresh the token automatically, and needs to be manually handled.

    However if the user is not logged in anymore or the token can't be refreshed, it will throw an error with a msg: 'login_required', in that case you need to either refresh the page or call the AuthenticationContext.login() to redirect the user to the login page.

    Leaving this here for the next person 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions