Getting Logged Out with Refresh Token

I have a browser plugin that I use to log in users, unfortunately they are getting logged out after about a week and I can’t figure out why. My flow is like so:

  1. Check if I have a refresh token
    1.1 If I do I fetch a new access token with the refresh_token grant type.
    1.2 If I don’t go to 2
  2. Launch the web-auth-flow built into the browser with the scopes offline_access, openid, profile and email.
  3. Store the refresh token and use the access token.

It seems this works for a while but after about a week it breaks down, the refresh token no longer gives me an access token. What steps could I take to remedy this?

Hi @XfiJSXIUvu

Check your refresh token expiration times? Or it could be you are relying on a session cookie and that is expiring?