Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 73f92b67c1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (new Date() > session.oauth.token.expiresAt) { | ||
| return { user: null, invalidateSession: true }; |
There was a problem hiding this comment.
Avoid invalidating session for expired non-refreshable token
This branch logs the user out whenever an access token expires and no refresh token is present, but authenticateRequest converts invalidateSession: true into a full session reset, not just token removal. For OIDC providers that do not issue refresh tokens (a common setup), this effectively limits login lifetime to the OAuth access-token TTL and forces repeated re-authentication even when the app could continue with a valid local session and simply omit locals.token for token-dependent features.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
not useful the oauth token is needed for inference calls
No description provided.