Skip to content

fix: Redirect to signIn page when accessing routes without signi…#173

Open
Nick-h4ck3r wants to merge 2 commits into
piyushgarg-dev:mainfrom
Nick-h4ck3r:auth/redirect-unauthenticated
Open

fix: Redirect to signIn page when accessing routes without signi…#173
Nick-h4ck3r wants to merge 2 commits into
piyushgarg-dev:mainfrom
Nick-h4ck3r:auth/redirect-unauthenticated

Conversation

@Nick-h4ck3r

Copy link
Copy Markdown

What does this PR do?

If user is not signed in, we will redirect to them to Sign In page. Currently, anyone was able to access routes like /dashboard, /dashboard/undefined/forms, dashboard/undefined, etc.

Fixes #102

Here's a loom video for visual changes to speed up reviews
Loom Video: https://www.loom.com/share/0e27cb4415b04f47a9b611978dde56b7

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)

How should this be tested?

Currently, if you go to any below addresses, you can see a rendered page with just layout. Ofcourse, data is not populated. But, in this push, I've fixed this, and instead user is redirected to sign in first.

  • /dashboard
  • /dashboard/undefined
  • /dashboard/undefined/forms
  • /dashboard/undefined/forms/edit/{any_id}

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

@github-actions github-actions Bot added bug Something isn't working good first issue Good for newcomers hacktoberfest Hacktoberfest Accepted Issues labels Oct 15, 2023
@github-actions

github-actions Bot commented Oct 15, 2023

Copy link
Copy Markdown

Thank you for following the naming conventions! 🙏

@Nick-h4ck3r Nick-h4ck3r changed the title Auth fix: Redirect to signIn page when accessing routes without signi… fix: Redirect to signIn page when accessing routes without signi… Oct 15, 2023
@github-actions github-actions Bot added the 🚨 merge conflict Merge Conflict label Oct 21, 2023
@Nick-h4ck3r

Copy link
Copy Markdown
Author

hey, I've resolved the conflicts. You can merge this PR now.

@github-actions github-actions Bot removed the 🚨 merge conflict Merge Conflict label Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working good first issue Good for newcomers hacktoberfest Hacktoberfest Accepted Issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Can access dashboard, even when not logged in

1 participant