Skip to content

Token renewal before expiry #21

@Pavinati

Description

@Pavinati

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions