Authentication

Auth Overview

Authentication and authorization are essential components of any web application. In staarter.dev, we provide a robust authentication system that includes user registration, login, and password recovery features. Additionally, we offer OAuth provider integrations for social login and two-factor authentication (2FA) support.

User Authentication

The user authentication system in staarter.dev is built on top of Lucia, a secure and flexible session management library. Lucia provides a simple API for managing user sessions. By leveraging Lucia, you can ensure that your application is secure and compliant with best practices for user authentication.

Features

The user authentication system in staarter.dev includes the following features:

  • User Registration: Users can sign up for an account by providing their email address and password. The registration process includes email verification to ensure that the user's email address is valid.
  • User Login: Registered users can log in to their account using their email address and password. Upon successful login, users receive a session token that allows them to access protected resources.
  • Passwordless Authentication: Users can sign in without entering a password by clicking on a magic link sent to their email address. Passwordless authentication provides a seamless and secure login experience.
  • Password Recovery: Users can reset their password by requesting a password reset link.
  • Two-Factor Authentication (2FA): Users can enable two-factor authentication for an extra layer of security when signing in. 2FA requires users to enter a verification code generated by an authenticator app.
  • OAuth Providers: staarter.dev includes built-in support for Google and Facebook OAuth providers. Users can sign in using their Google or Facebook account, providing a convenient and secure login experience.
Previous
Creating a new procedure