Rezin Core Rezin Core
Docs

Authentication

More sign-in providers

Besides Google and GitHub, your application's people can sign in with sixteen more services, with any other service that speaks OpenID Connect, or with no account at all to begin with. Everything here is for your application's own users, not for console accounts.

The providers

Apple, Microsoft, Discord, Facebook, GitLab, Bitbucket, LinkedIn, Slack, Twitch, X, Spotify, Notion, Figma, Zoom, Keycloak and WorkOS.

Each one uses your own app with that provider. Rezin Core has no app of its own with these, so there is nothing shared between projects.

Google and GitHub are the two that have been run against the real service. The sixteen here are built to each provider's published description of its sign-in and are tested against stand-ins that answer as the provider documents; they have not each been run against the live service. Try yours before you rely on it, and tell us what you find.

Setting one up

Sign-in, then Providers. Pick the provider.

  1. Register an app with the provider and give it the callback address the page shows. It looks like https://api.rezincore.com/v1/auth/callback/discord: one address per provider, the same for every project.
  2. Enter the client ID the provider gave you.
  3. Paste the client secret. It is sealed in the project's Secrets (as DISCORD_CLIENT_SECRET, and so on) and is never shown again, on this page or anywhere else.
  4. Fill in anything the provider needs besides (below).
  5. Tick Let people sign in with … and save. The switch cannot be turned on before the client ID and the secret are in.

A provider shows On, not finished when it is switched on but something it needs is missing.

ProviderBesides the client ID and secret
MicrosoftTenant: your directory's ID or domain. Left empty it is "common", any Microsoft account. See the note on addresses below.
GitLabAddress of your instance, if you run your own. Empty means gitlab.com.
KeycloakAddress of your realm, for example https://id.example.com/realms/main. Needed.
WorkOSOrganization or connection (org_… or conn_…): which of your customers' sign-ins to use. Needed.
AppleThe client secret Apple asks for is a signed token you generate from your Sign in with Apple key. It lasts at most six months; paste a new one before it runs out.
XX gives an email address only to apps it has approved for it. Without that, nobody can sign in this way.

Using one

Exactly as for Google and GitHub: the redirect flow. Send the person's browser to

https://api.rezincore.com/v1/auth/authorize/discord?project=<project id>&redirect_to=<one of your listed addresses>

and swap the one-time code they come back with at POST /v1/auth/exchange. The provider's name in the address is its name in lower case: apple, microsoft, discord, facebook, gitlab, bitbucket, linkedin, slack, twitch, x, spotify, notion, figma, zoom, keycloak, workos, or custom-… for one of your own.

If the sign-in does not finish, the person comes back with error= and one of:

errorMeans
cancelledThey said no at the provider.
not_verifiedThe provider gave no ID or no email address, or does not vouch for the address and the person has no account yet.
account_existsThe address already has an account that does not use this provider. See below.
no_accountNo account, and this project does not let people make their own.
disabledThe account is disabled.
not_configuredThe provider is not set up.

Which account a person gets

  1. The account already joined to that provider account, found by the provider's own ID for the person. Their address may have changed since; it does not matter.
  2. Otherwise, if the address already has an account: by default nothing is joined and the person is sent back with account_exists. They sign in the way they already do. You can change this under Sign-in, Methods: Join a provider sign-in to an existing account with the same email address. Even then it happens only when the provider vouches for the address.
  3. Otherwise, a new account in the organization new accounts join, if the project lets people make their own, and only when the provider vouches for the address.

Whether the address was checked differs by provider, and Rezin Core takes each at its word:

  • Spotify does not confirm the addresses on its accounts. A Spotify sign-in is never joined to an existing account by its address, and makes no new account.
  • Microsoft, with the tenant left at "common", does not always say an address was checked. Name your own tenant (the addresses in your own directory are yours to vouch for), or add the optional claim xms_edov to your app.
  • Discord and Zoom say so for each person. The others answer only with an address they have confirmed.

Projects that existed before this page did keep joining by address, as they always have. A new project starts with it off.

A custom provider

Sign-in, Providers, Add a custom provider. For any service that speaks OpenID Connect.

  • Give its issuer address and Rezin Core reads its sign-in addresses from what it publishes (/.well-known/openid-configuration), once.
  • Or give the three addresses yourself: authorize, token and user info.
  • Scopes default to openid email profile.

It is used like any other, as custom-<its name>, and a project can have ten. The provider must answer with sub, email and email_verified.

The addresses you type are called by Rezin Core's servers, so they must be public https addresses. An address inside a private network is refused.

Adding a provider to an account that is already signed in

Off unless you turn on Let a signed-in account add or remove a provider itself (Sign-in, Methods).

POST /v1/auth/link/discord
apikey: <publishable key>
Authorization: Bearer <the account's token>

{ "redirectTo": "https://app.example.com/settings" }

The answer is { "url": "…" }: send the person's browser there. They come back to your address with linked=discord. Nobody is signed in by this and no account is made. A provider account already joined to a different account answers error=already_linked.

  • GET /v1/auth/identities lists what the account signs in with: { "password": true, "identities": [ { "provider": "discord", "connectedAt": "…" } ] }.
  • DELETE /v1/auth/identities/discord takes one away. The last way in cannot be removed: 409 last_way_in.

Temporary accounts

For letting a visitor use your application before they decide to sign up. Off unless you turn on Temporary accounts (Sign-in, Methods); it needs the organization new accounts join.

POST /v1/auth/anonymous
apikey: <publishable key>

Answer: 201 { "token": "…", "userId": "…", "organizationId": "…", "anonymous": true, "idleMinutes": 15 }. The account has no email address of its own. Use the token like any other; your access rules see an ordinary signed-in account.

When the person signs up, the same account takes an email and a password and keeps its ID and everything it made:

POST /v1/auth/anonymous/claim
apikey: <publishable key>
Authorization: Bearer <the temporary account's token>

{ "email": "[email protected]", "password": "…", "fullName": "Kim Reyes" }

Errors: 409 email_in_use, 400 weak_password, 409 not_anonymous, and 409 confirm_needed in a project that confirms email addresses (a temporary account cannot be confirmed yet; have the person sign up instead).

Each temporary account counts as a monthly user, and making one counts toward the sign-in limit for its network address. A temporary account that is never claimed stays until you delete it.

Not built

  • Phone sign-in and passkeys. They are being built.
  • SAML single sign-on, and sign-in with a crypto wallet.
  • A CAPTCHA on sign-up. It would need an outside service.
  • The official marks of these providers on the Providers page: it shows a plain tile with the provider's initial.

This page as Markdown · llms.txt · Rezin Core is in development and available by invitation.