ReactJS - How can I get refresh token using "@auth0/auth0-spa-js"

Is there a way to use the auth0-spa-js library to get refresh token? I can get access token or Id-token with built-in functions.

I looked through the source code and seems like auth0-spa-js stores the refresh token cache.ts, I’m not familiar with ts and cant figure out how to add a new function to export the refresh token.

Has anyone done something similar?

Hey there!

Unfortunately I don’t have that much experience with that repo however I will suggest two approaches in handling this:

  • As you have seen that in the typescript file in the repo I would go about it by raising a GitHub issue in the repo and asking the tool maintainers about it directly (the best approach I guess)

  • Try utilising our doc on refresh tokens: