just fyi,the reason I am asking is this.
I have "get own profile" call which happens on server side and, if it returns an id, means the user is logged in basically. most of the show/hide logic is based on this.
I also have a refresh token logic which does not happen serve side (otherwise it does not work).
in suapbase I have the token limit to 1 hour. if I am logged in, and close the tab then return after two hours the server side profile call returns null (because the access_token is invalid I guess) but the refresh token is still valid. so I say: run the refresh token call on load and then also make the get profile call (only if token_expires_at is less than 5 minuts from now; this is a data point that I save in sessio storage).
but this is does not have a good effect since for a split second the user seems to be logged out @MartinF @Andreas Møller