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

Token renewal before expiry #21

Open
Pavinati opened this issue Nov 25, 2022 · 0 comments
Open

Token renewal before expiry #21

Pavinati opened this issue Nov 25, 2022 · 0 comments

Comments

@Pavinati
Copy link

The Astarte JWT token is generated only once during the client initialization

with {:ok, jwt} <- fetch_or_generate_jwt(opts) do

This token has a default expiry of 5 minutes. If the generated client is used after the token is expired, the client does not renew the token which will make Astarte reply with 403 Forbidden.

Proposed solution:
Validate JWT token expiry before using it. If close to the expiration time, renew the JWT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant