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

#167496794: Protect private routes #30

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Tyak99
Copy link
Contributor

@Tyak99 Tyak99 commented Jul 25, 2019

What does this PR do?

  • add routing protection to the project

Description of Task to be completed?

  • add signout action
  • redirect a user to login page when they try to access protected routes
  • redirects user to dashboard when they try to access public routes while signed in

Any background context you want to provide?

N/A

What are the relevant Github issues?

N/A

Questions:

N/A

@Tyak99 Tyak99 temporarily deployed to freyja-frontend-staging-pr-30 July 25, 2019 08:36 Inactive
@Tyak99 Tyak99 force-pushed the ft-protect-routes-167496794 branch from 0b81218 to 6b5a5d2 Compare July 25, 2019 08:47
@Tyak99 Tyak99 temporarily deployed to freyja-frontend-staging-pr-30 July 25, 2019 08:47 Inactive
Copy link
Contributor

@fortunee fortunee left a comment

Choose a reason for hiding this comment

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

Please implement the feedback above

src/components/Header/Header.js Show resolved Hide resolved
src/test/components/PrivateRoute.spec.js Outdated Show resolved Hide resolved
component: () => {},
isAuthenticated: false,
};
describe('component: PraveRoute', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be PublicRoute in the describe
describe.only('component: PublicRoute', () => {

@Tyak99 Tyak99 force-pushed the ft-protect-routes-167496794 branch from 6b5a5d2 to 16368d2 Compare July 29, 2019 14:36
@Tyak99 Tyak99 temporarily deployed to freyja-frontend-staging-pr-30 July 29, 2019 14:36 Inactive
@Tyak99 Tyak99 force-pushed the ft-protect-routes-167496794 branch from 16368d2 to 60f2bfb Compare July 29, 2019 14:44
@Tyak99 Tyak99 temporarily deployed to freyja-frontend-staging-pr-30 July 29, 2019 14:44 Inactive
@Tyak99 Tyak99 force-pushed the ft-protect-routes-167496794 branch from 60f2bfb to 4c2f5c8 Compare July 30, 2019 09:08
@Tyak99 Tyak99 temporarily deployed to freyja-frontend-staging-pr-30 July 30, 2019 09:08 Inactive
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