Sign-in providers
This page is for operators who let people sign in with GitHub or Google. It covers creating the app at each provider, the variables to set, how GitHub’s two-step verification counts as MFA, and turning a provider off.
Both are optional. Each shows up on the sign-in page once both its client ID and its client secret are set, as a Continue with GitHub or Continue with Google button. Without them, people sign in with a password, a passkey or an email link.
Nobody gets an account by signing in with a provider: accounts come from invitations only. A provider only gives people with an account another way in. When someone signs in with a provider account that isn’t connected yet, Adiutor connects it to the account with the same email address, if the provider says it verified that address. People can also connect and disconnect GitHub and Google themselves under Connected accounts on their Security page. A connection made at sign-in is told to its owner by email, and on an account with a second step it stays unconfirmed until the owner presses Confirm. See Account security and Signing in.
Adiutor’s address is the one you set as BETTER_AUTH_URL. The examples use https://adiutor.dev. Where a step says to restart Adiutor, restart it so it reads the changed environment: with Docker Compose, docker compose up -d (docker compose restart keeps the old settings).
GitHub
Section titled “GitHub”- On GitHub, open Settings › Developer settings › OAuth Apps (
https://github.com/settings/developers) and create a new OAuth app. - Set the homepage URL to
https://adiutor.devand the authorization callback URL tohttps://adiutor.dev/api/auth/callback/github. - Create a client secret, and set
GITHUB_CLIENT_IDandGITHUB_CLIENT_SECRETin the server’s environment. - Restart Adiutor. The sign-in page now shows Continue with GitHub.
- In the Google Cloud console, open APIs and services › Credentials (
https://console.cloud.google.com/apis/credentials) and create an OAuth client of the type Web application. - Add the authorised redirect URI
https://adiutor.dev/api/auth/callback/google. - Set
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETin the server’s environment. - Restart Adiutor. The sign-in page now shows Continue with Google.
GitHub’s two-step verification as MFA
Section titled “GitHub’s two-step verification as MFA”Staff Admins, staff Managers and the Admin of a company need MFA (see Account security). A GitHub account that has two-factor authentication counts as that second step. Google doesn’t.
GitHub counts only while its credentials are set on your server. If you remove GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET while staff or company Admins rely on GitHub as their only MFA, that MFA stops counting. They are then treated like newly invited people: after an email link, they set up a passkey or an authenticator app, and so could whoever controls their inbox.
While that is the case, staff Admins see a warning on the dashboard, “GitHub sign-in isn’t configured on this server”, with how many users it affects, and the Users list shows those users as “Needs MFA”.
Turning a provider off
Section titled “Turning a provider off”- Have the Admins who rely on GitHub as their only MFA add a passkey or an authenticator app first.
- Remove the provider’s two variables from the environment.
- Restart Adiutor.
Their accounts stay connected, but the provider’s button is gone and signing in with it doesn’t work until you set the variables again.
Preview environments
Section titled “Preview environments”Each environment needs its own callback address registered at the provider: a preview at https://preview.adiutor.dev has a callback of https://preview.adiutor.dev/api/auth/callback/github, which your app at GitHub or Google doesn’t know about. Where you can’t register it, leave the provider’s variables unset in that environment, so it shows no button that would fail. See Vercel for settings per environment.
Example
Section titled “Example”At https://adiutor.dev, Alex Admin ([email protected]) has staff Admin MFA through a GitHub account with two-factor authentication. Before Adiutor’s operator removes the GitHub variables, Alex adds a passkey on their Security page. Otherwise, the dashboard warns that one user has no MFA now.
Good to know
Section titled “Good to know”- When a callback address doesn’t match, the provider refuses, and Adiutor’s sign-in error page explains the problem and gives a reference you can look up (see Logs and errors).
- Keep the client secrets private: see Secrets and incidents.
Related
Section titled “Related”Adiutor's code is released under the MIT License. The Adiutor name and logo aren’t covered by it; see the notice.
Set in Inter and JetBrains Mono, under the SIL Open Font License (Inter, JetBrains Mono).