Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mobile): Stop sending app to login page for unrelated auth errors #7383

Merged
merged 2 commits into from Feb 27, 2024

Conversation

martyfuhry
Copy link
Contributor

  • Only validate access token with server if we have one in the Store
  • Only return to the login page when the error exception has a 401 status.

Copy link

cloudflare-pages bot commented Feb 24, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 78d1c99
Status:⚡️  Build in progress...

View logs

@@ -16,28 +17,31 @@ class AuthGuard extends AutoRouteGuard {
resolver.next(true);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the only section I'm not terribly sure about. I think we should block the resolver if Store.get(StoreKey.accessToken) excepts with a StoreKeyNotFoundException because we do that synchronously. But I didn't want to change the logic here, so I left this intact.

…nly send you to the login page when the response from the server is a 401

linter
Copy link
Contributor

@jrasm91 jrasm91 left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@opbod
Copy link
Contributor

opbod commented Feb 25, 2024

Might fix #4850?

@martyfuhry
Copy link
Contributor Author

Might fix #4850?

Yes, I believe so.

@alextran1502 alextran1502 merged commit d799bf7 into main Feb 27, 2024
24 of 25 checks passed
@alextran1502 alextran1502 deleted the fix/mobile-auth-signout branch February 27, 2024 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants