• Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
FusionAuth
  • Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login

How to get JWT token refreshed automatically when retrieving it from JS SDK?

Scheduled Pinned Locked Moved Unsolved
Q&A
2
3
410
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    ab
    last edited by 4 Apr 2022, 18:41

    Hi guys.
    We are evaluating FusionAuth and are trying to apply common practices for getting/refreshing access token.

    Services like Auth0 or AWS Cognito provide js sdk that is responsible to returning current access token as well as refreshing it once expired, abstracting this behaviour in single SDK method (e.g. getTokenSilently).

    This allows to get either active token or get refreshed one if current token expired.

    Do we have a way to achieve corresponding behavior with FusionAuth JS SDK?

    A 1 Reply Last reply 5 Apr 2022, 11:24 Reply Quote 0
    • A
      ab @ab
      last edited by 5 Apr 2022, 11:24

      According to client library maintainers answer this is not smth available in js/ts library currently
      https://github.com/FusionAuth/fusionauth-typescript-client/issues/74#issuecomment-1087919324

      1 Reply Last reply Reply Quote 0
      • G
        gg-dev
        last edited by gg-dev 4 Dec 2022, 17:43 12 Apr 2022, 17:41

        See also: The client libraries should include token management functionality.

        Glen.

        1 Reply Last reply Reply Quote 1
        • First post
          Last post