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

Authentication #22

Merged
merged 31 commits into from
May 16, 2024
Merged

Authentication #22

merged 31 commits into from
May 16, 2024

Conversation

Zilola-Nazarova
Copy link
Owner

@Zilola-Nazarova Zilola-Nazarova commented May 16, 2024

Features developed in this branch:

  • Sign Up (with Email, name, password/confirm password)
  • Sign In (with Email and password)
  • Sign In with Google Oauth
  • Sign Out

Client: token is passed using axios interceptors.
Server: token is verified in auth middlevare.

User credentials are stored in Cookies and expire in 1 h. The user gets logged out automatically after Cookies expire.

Some small adjustments and bugfixes were performed as well.

…om error messages, hash passwords before saving them to database and prevent returning the password to the client side
…lude <header> and <nav> elements correspondingly; make the app name in Header redirect to the HomePage; create a route for authentication and include it in Navbar
… the data is still loading or an error was catched
…is.com and sets it into localStorage when fulfilled, add it to Redux store
…he newly created getUser action (authSlice) to enable this feature
…the localStorage so that the user stays logged in until he logs out
…ned in alonside with the Sing Out button; for non-authenticated users only Login button is shown
… (signup/signin), test the feature in Postman
…hSlice and dispatching them in Auth component
…ent process data coming both from google-oauth or regular signin/signup
…array), update components and forms to exlude unnecessary arrays
… it from req.params instead of req.body since we can't access req.body in delte requests
…are refetched with error or refetching is in process
… token to client since later the server will decode them differently
…e to import it to all Redux slices; interceptor provides the Authorization token depending on the token type
…ract the userId, we'll later use it to query data and restrict some actions
… otherwise users have to refresh the page after registration to see the pages that require credentials
…the oauth access_token can not be decoded by jwt)
@Zilola-Nazarova Zilola-Nazarova linked an issue May 16, 2024 that may be closed by this pull request
4 tasks
@Zilola-Nazarova Zilola-Nazarova merged commit e4fb5f3 into dev May 16, 2024
3 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
Development

Successfully merging this pull request may close these issues.

Authentication
1 participant