← Back to overview

Authentication

August 7, 2024

Authentication Module.

Module for authentication functionalities, with the minimal functionalities as

Login

User login with password and email.

  • [x] Sign in form with email and password.
  • [x] Validate email and password in form
  • [x] Redirect to dashboard after successful login
  • [x] Validate valid credentials in backend
  • [x] Show error message if credentials are invalid
  • [x] Show loading state while logging in
  • [x] Show error message if there is an error in the backend

Social login Google , Github

  • [x] Sign up with Google button
  • [x] Sign up with Github button
  • [x] Setup environment variables google
  • [x] Setup environment variables github
  • [x] Redirect to Google login page
  • [x] Redirect to dashboard after successful login
  • [x] Validate valid credentials in backend
  • [x] Show error message if credentials are invalid
  • [x] Show loading state while logging in
  • [x] Validate if user is already registered, if not create a new user.

Register

  • [x] Sign up form with email and password.
  • [x] Validate email and password, re-enter password and if agreements are checked.
  • [x] Redirect user to dashboard after successful registration
  • [x] Validate valid credentials in backend
  • [x] Show error message if credentials are invalid
  • [x] Show loading state while registering
  • [x] Show error message if there is an error in the backend
  • [x] Send email verification link to the user.
  • [x] Show success message if user is registered successfully.

Forgot password / Reset password

  • [x] Forgot password form with email.
  • [x] Send forgot password email to user.
  • [x] Generate unique token for resetting password, with expiration time.
  • [x] Reset password after user clicks to link with new password.
  • [x] Check you password in the mailbox.
  • [x] Redirect user to login page.

User session

  • [X] Create valid user sessions to interact with database.
  • [X] Validate user session in the backend.
  • [X] Destroy user session after user logs out.
  • [X] Redirect user to login page after session is destroyed.
  • [X] Automatically log out user after session is expired.