If I have a PWA, how often to users need to login
-
I have a progressive web app that I am authenticating against FusionAuth. I'll be getting a refresh token. How often do users need to reauthenticate with their credentials (username/password, etc)?
-
The short answer is however often you want, but at least once per device.
You basically can set up your refresh token policy to have your refresh tokens live for a very long time (as long as you are comfortable with the security risk; make sure to secure the refresh token carefully). That is controlled in in the application configuration: https://fusionauth.io/docs/v1/tech/core-concepts/applications/#jwt
Then, every time an access token expires, you can mint a new one with the refresh token. Here are the APIs you'd be interested in calling: