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

[HIGH LEVEL] Update parseAuth method so auth guards to handle error not method #300

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

eleanorreem
Copy link
Contributor

@eleanorreem eleanorreem commented Aug 1, 2023

  • the Unauthorized Exceptioin wrapper was adding filler that was confusing the auth guards.
  • Errors that are thrown are now handled by the auth guard rather than the auth service method. In general we want the controllers and auth guards to put wrappers around the exception and then for the nested methods to pass the error back

@eleanorreem eleanorreem changed the title Update parseAuth method so auth guards to handle error not method [HIGH LEVEL] Update parseAuth method so auth guards to handle error not method Aug 2, 2023
Copy link
Contributor

@Zahra-8d Zahra-8d left a comment

Choose a reason for hiding this comment

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

Question: Why do we have two separate variables for uid and userUid? Not gonna cause any issues but might be redundant.

@eleanorreem
Copy link
Contributor Author

eleanorreem commented Aug 2, 2023

Different ways of doing it really. Userid and uid are the same thing - I just was using a mutable variable as uid isn't accessible outside the try catch. Any suggestions for a better pattern is welcome

@eleanorreem eleanorreem merged commit 462e93f into develop Aug 3, 2023
3 checks passed
@eleanorreem eleanorreem deleted the auth-expiry-error branch August 3, 2023 15:29
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.

2 participants