Electron App - capturing and writing refresh tokens to a JSON file

Hi there -

This is regarding @auth0/auth0-spa-js": "^1.22.2.

For reference, I am working on a desktop Electron app. The app connects to multiple APIs (Google, VImeo, AWS) and writes the user’s tokens (access and refresh) to a JSON in their prefs folder. I am trying to access and store tokens from one of our own APIs through auth0, but I’m running into issues and need some guidance.

  1. Can i access refresh tokens directly while using this library? I am currently using the approach outlined in the auth0-spa documentation (vs. the Authorization w/PKCE code flow written in vanilla js).
  2. If I am able to access refresh tokens, am I able to provide them to the auth0Client instance to use with methods like logInWithRedirect?

I have already read, forked and messed with the Electron example provided here: Build and Secure an Electron App - OpenID, OAuth, Node.js, and Express
I’m a newer dev working solo on this and have been spinning my wheels for a while. It would be helpful to know if I am able to accomplish the above requirements with this library, or if I should I build my own solution as referenced here: Call Your API Using the Authorization Code Flow with PKCE and in the Electron auth0 blog post?

This may be the same answer as here (How to get refresh token using 'auth0-js' popup and google connection - #4 by mathiasconradt) but wanted to confirm and see if recent updates had changed the answer.

Any help would be much appreciated!