Skip to content

Better reauth / anticipate expiration #13

Description

@Layf21

Motivation

The reauth functionality gets triggered at least every 12 Hours because the token expires. By using the "exp" field in the token, I can renew the token before making any unauthorized requests, reducing raised exceptions and preventing unnecessary requests.

Implementation

  • Rewrite/Clean up the reauth functionality
  • Parse the token with PyJWT or something similar
  • Reauth a minuite before expiration to anticipate errors
  • Give extra info in exceptions.AuthenticationError if the token is expired

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions