flutter_appauth icon indicating copy to clipboard operation
flutter_appauth copied to clipboard

How to verify token ?

Open xnopre-vrtice opened this issue 10 months ago • 1 comments

Hi,

Thanks for this great plugin ! 👍🙏

I have a question. How can I verify a (previously stored) token when my app starts ?

More details. After logged, I have an "access token" and a "refresh token". I store this both. When the app starts again, I want to verify if the token is still valid. If not I will as for a refresh token. So my question is how to verify the current token ?

Thanks,

Xavier

xnopre-vrtice avatar Feb 24 '25 14:02 xnopre-vrtice

You can verify if the stored access token is valid by checking the "accessTokenExpirationDateTime" attribute.

Store the attribute to retrieve it later together with the access token and refresh token.

Image

PedroHenrique-42 avatar Feb 25 '25 13:02 PedroHenrique-42

Thanks for your help in answering @PedroHenrique-42

MaikuB avatar Aug 27 '25 10:08 MaikuB