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

Add redirection and logout button to the login functionality #249

Conversation

SamuelPelletierEvraire
Copy link
Contributor

@SamuelPelletierEvraire SamuelPelletierEvraire commented Sep 24, 2024

Add rederect to loginPage if not authentificated else go to homePage
Add authUtils that look if the user is authentificated.
Add rederection to HomePage when login sucessfully

This pull request resolve 3 issue #226 #224 and #222

Add rederect to loginPage if not authentificated else go to homePage
Add authUtils that look if the user is  authentificated.
Add rederection to HomePage when login sucessfully
Copy link
Member

@k-allagbe k-allagbe left a comment

Choose a reason for hiding this comment

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

Great start.
Few things to consider:

  • Should access to the main page (home) be prevented when the user is not logged in?
  • In your implementation, can the user log in with another account after the first login?
  • I suggest the login remain in the settings page.

Add authUtils that look if the user is  authentificated.
Add rederection to HomePage when login sucessfully
Add logout button if the user is already connected
@SamuelPelletierEvraire SamuelPelletierEvraire changed the title Add new Login page separate from setting page Add redirection and logout button to the login functionality Sep 25, 2024
src/Pages/SettingPage/SettingPage.tsx Outdated Show resolved Hide resolved
src/Utils/Auth/AuthUtil.ts Show resolved Hide resolved
src/Pages/SettingPage/SettingPage.tsx Outdated Show resolved Hide resolved
src/Pages/SettingPage/SettingPage.tsx Outdated Show resolved Hide resolved
src/Pages/SettingPage/SettingPage.tsx Outdated Show resolved Hide resolved
src/Pages/SettingPage/SettingPage.tsx Outdated Show resolved Hide resolved
src/Pages/SettingPage/SettingPage.tsx Outdated Show resolved Hide resolved
src/App.tsx Show resolved Hide resolved
src/Pages/SettingPage/SettingPage.tsx Outdated Show resolved Hide resolved
and fix last comment by @k-allagbe
and fix last comment by @k-allagbe
@k-allagbe k-allagbe self-assigned this Oct 4, 2024
@k-allagbe k-allagbe merged commit 46e7253 into main Oct 4, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants