Skip to content

Check if credentials have expired #35

@ProtossGP32

Description

@ProtossGP32

Is your feature request related to a problem? Please describe.
Sometimes woffu-cli fails to complete its requests because the authentication token has already expired, but the application doesn't warn the user about this.

Describe the solution you'd like
When calling the application, if a token is available in the credentials file, do a health check by doing a simple request to any Woffu endpoint. The HTTP response should tell us whether the issue is due to incorrect authentication or is a different problem. It should also ask us if we want to renew the token.

Describe alternatives you've considered
We might also check the modification time of the credentials file and warn the user if we're close to the token expiration (90 days).

Additional context
None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions