Skip to content

Only reauth on missing jwt - #58

Merged
J164 merged 1 commit into
mainfrom
fix-main-auth
Aug 27, 2025
Merged

J164 merged 1 commit into
mainfrom
fix-main-auth

Conversation

@J164

@J164 J164 commented Aug 27, 2025

Copy link
Copy Markdown
Member

No description provided.

@J164
J164 requested review from a team and Copilot August 27, 2025 01:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR changes the JWT error handling behavior in the API response interceptor to only trigger full re-authentication (redirect to login) when the JWT is missing, while expired or invalid JWTs now trigger a page reload instead.

  • Separates handling of missing JWT from expired/invalid JWT errors
  • Missing JWT redirects to login page for full re-authentication
  • Expired/invalid JWT errors now reload the page instead of redirecting to login

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread shared/src/api/api.ts
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rp-web-sponsor with  Cloudflare Pages  Cloudflare Pages

Latest commit: bd269fd
Status: ✅  Deploy successful!
Preview URL: https://41f000a5.rp-web-sponsor.pages.dev
Branch Preview URL: https://fix-main-auth.rp-web-sponsor.pages.dev

View logs

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rp-web-site with  Cloudflare Pages  Cloudflare Pages

Latest commit: bd269fd
Status: ✅  Deploy successful!
Preview URL: https://dfc47645.rp-web-site.pages.dev
Branch Preview URL: https://fix-main-auth.rp-web-site.pages.dev

View logs

@Bahl-Aryan Bahl-Aryan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@J164
J164 merged commit d0ea8d8 into main Aug 27, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants