yorkie-team / dashboard

Dashboard is an administrative tool that allows users to manage projects and documents with ease.
https://yorkie.dev/dashboard/
Apache License 2.0
25 stars 14 forks source link

chore: prevent go back loop #98

Closed blurfx closed 1 year ago

blurfx commented 1 year ago

What this PR does / why we need it?

If we redirect a login page when user access an unauthorized page, user can't be able to leave the page through 'Go Back'.

1. User access unauthorized page (/dashboard)
2. Redirect user to login page (/dashboard/login)
3. User press `Go Back`
4. Go to `/dashbaord` and loop start again from step 1

We can escape from go back loop by replacing instead of normal navigating.

Any background context you want to provide?

The development environment is not setup on my machine so this pr has not been tested.

What are the relevant tickets?

Fixes #

Checklist

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.