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

[SDK-1778] Add AuthGuard to protect unauthenticated users from accessing certain routes #16

Merged
merged 7 commits into from
Jul 30, 2020

Conversation

samjulien
Copy link
Contributor

@samjulien samjulien commented Jul 28, 2020

By submitting a PR to this repository, you agree to the terms within the Auth0 Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.

Description

  • As a developer I want to be able to protect any route I choose from being accessed by unauthenticated users
  • As an unauthenticated user I should be automatically redirected to the login page if I try to access a protected route
  • As an authenticated user I should be able to access the protected route without seeing a login page
  • As a developer I want to be able to use the guard with both path routing and hash routing

Testing

I've added unit tests as well as a protected route for the playground.

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

@stevehobbsdev stevehobbsdev self-requested a review July 30, 2020 10:52
Otherwise, the call to `navigateByUrl` appears to never complete and the
redirect never happens.
@stevehobbsdev stevehobbsdev merged commit 0c1c47f into master Jul 30, 2020
@stevehobbsdev stevehobbsdev deleted the feat-auth-guard branch July 30, 2020 17:53
@lbalmaceda lbalmaceda added this to the v0.1.0 milestone Aug 14, 2020
@lbalmaceda lbalmaceda added the CH: Added PR is adding feature or functionality label Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH: Added PR is adding feature or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants