Skip to content

[Issue] Cached Intra token logic breaks repeated fetch_exams() calls #31

Description

@RomanAlexandroff

Problem

fetch_exams() keeps the OAuth token in a static String token. After the first successful token fetch, the token is no longer "NOT_FOUND", so ensure_getting_token() skips its retry loop, leaves success = false, and returns failure.

This breaks any second fetch_exams() call during the same boot cycle, especially in exam_mode() where two calls are intentional.

Expected behavior

Repeated fetch_exams() calls in the same boot should either reuse a valid cached token correctly or request a fresh token when needed.

Suggested fix

Update ensure_getting_token() so cached tokens are treated as valid, or remove the static token cache entirely. Be careful with secret_verification(), which should not validate a new secret using an old cached token.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions