Authentik is a self-hosted identity provider which supports the OpenID Connect (OIDC) protocol. As such, we may use it for single sign-on authentication in Memos. This guide assumes you already have a Authentik instance set up and running, and have users added to your environment.
Step 1: Configure Authentik for Memos
Setup Authentik Provider
- In the sidebar navigate to Applications > Providers
- Create a new OAuth2/OpenID Provider
- Set "Name" as
Provider for Memos
- Set your Authorization flow, default
default-provider-authorization-explicit-consent (Authorize Application)
works - Set "Redirect URIs/Origins (RegEx)" to
https://<YOUR-MEMOS-DOMAIN>/auth/callback
- Click "Finish" at the bottom of the page
Setup Authentik Application
- Download the Memos Logo Here
- In the sidebar navigate to Applications > Applications
- Click "Create" at the top to creat a new application
- Set "Name" to
Memos
- Set "Slug" to
memos
- Set "Provider" to
Provider for Memos
, which you just created - Drop down "UI Settings"
- Under "Icon" upload the logo-rounded.png you downloaded
- Click "Create" at the bottom of the page
Step 2: Obtaining the necessary endpoints for Memos
With the Authentik configuration ready, all we need now is to copy all the credentials and authentication endpoints.
- Back in Authentik, under Applications > Providers, Select the
Provider for Memos
you created earlier - Copy down the URLs under
Authorize URL
,Token URL
, andUserinfo URL
- Click "Edit" and copy down the
Client ID
andClient Secret
Step 3: Configuring Memos
Finally, we can open Memos and add Authentik as an authentication option.
Log into your Memos account and select the "Settings" button.
Click on "SSO."
Click the "Create" button.
Type = OAUTH2
Template = Custom
Fill out the following details:
- Set "Name" as anything you wish, such as "Authentik." This will appear on a button on the Memos login page.
- Paste your
Client ID
- Paste your
Client Secret
- Paste your
Authorize URL
into the authorization endpoint. - Paste your
Token URL
in the token endpoint. - Paste your
Userinfo URL
int he user info endpoint. - Set "Scopes" as
openid profile email
. - Set "Identifer" as
preferred_username
. - (Optional) Set "Display name" as
given_name
. - (Optional) Set "Display name" as
email
.
Congratulations! You may now log into Memos using Authentik! 🥳