Docs
Authentication
Providers
Learn about the authentication providers in Achromatic.
Both Credentials and OAuth authentication via Google or Microsoft are supported. For more providers please visit the Auth.js documentation.
Credentials provider
The credentials provider is fully implemented. This includes:
- Login
- Sign up
- Forgot password
- Verification via link
- Verification via OTP
- Password change
- Email change
Passwords are hashed and compared using bcrypt
with a salt length of 13. To use the credentials provider, email sending must be configured.
Google provider
Google allows users to authenticate using their Google accounts, offering a quick and familiar sign-in method.
To set up the Google Provider, follow these steps:
- Visit the Google Cloud Console.
- Create an account if you don't have one already.
- Navigate to APIs or click here
- Configure the
OAuth consent screen
and add yourself as test user. - Click on
Credentials
, create new OAuth credentials and save those credentials. - Add the Authorized JavaScript origin to the credential settings.
http://localhost:3000
- Add the Authorized redirect URI to the credential settings.
http://localhost:3000/api/auth/callback/google
- Update
apps/dashboard/.env
with the created credentials.
AUTH_GOOGLE_CLIENT_ID=
AUTH_GOOGLE_CLIENT_SECRET=
Microsoft provider
Microsoft allows users to authenticate using their Microsoft work, school, or Xbox accounts.
To set up the Microsoft (Entra ID) Provider, follow these steps:
- Visit the Azure Portal.
- Create an account if you don't have one already.
- Navigate to your Entra ID (Active Directory).
- Register a new application with platform web.
- Click on
Authentication
in the menu and add the redirect URIs
http://localhost:3000
http://localhost:3000/api/auth/callback/microsoft-entra-id
- Under
Certificates & Secrets
, create a new client secret. - Update
apps/dashboard/.env
with the created secret.
AUTH_MICROSOFT_ENTRA_ID_CLIENT_ID=
AUTH_MICROSOFT_ENTRA_ID_CLIENT_SECRET=