Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to check for the expiry of the RefreshToken? #269

Open
Sunita76 opened this issue Jan 13, 2023 · 2 comments
Open

How to check for the expiry of the RefreshToken? #269

Sunita76 opened this issue Jan 13, 2023 · 2 comments
Labels
question Quesion regarding Fortnox API, not an issue in SDK

Comments

@Sunita76
Copy link

For checking the expiry of the AccessToken I can use:
var auth = new StandardAuth(accessToken);
var isExpired = auth.IsExpired();
Can I check the RefreshToken expiry also in the same way?

Thanks

@richardrandak
Copy link
Collaborator

No, the refresh token does not have the JWT format which could be decoded in order to retrieve its expiration time. Since the SDK does not know when the refresh token was obtained, there is no way to calculate the expiration time either.

So, you have implement your own way to manage the refresh token expiration time.

@richardrandak richardrandak added the question Quesion regarding Fortnox API, not an issue in SDK label Jan 17, 2023
@Sunita76
Copy link
Author

Thanks a lot for the explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Quesion regarding Fortnox API, not an issue in SDK
Projects
None yet
Development

No branches or pull requests

2 participants