Skip to content

Sign-in and accounts

  • Built-in sign-in: Password sign-in, sessions and short-lived tokens, with no separate identity service.
  • Sign-in page: The app signs people in at its own address, where the browser’s Back returns to the step before, and signing in comes back to the page they were on.
  • First admin: No account can be made over the web while the app has no users. You create the first admin from the terminal, and the last active admin cannot be deleted, demoted or blocked.
  • Users from a script: A seed or another script of the project creates and lists users, and mints their tokens, on the app’s own sign-in.
  • Versioned sign-in tables: The sign-in tables come from numbered steps that ship with Protobase, a chain for each module of sign-in, written as the project’s own migrations and recorded in the database, so a deploy checks them without comparing tables. Every step only adds, and one that assumes something of the rows already there checks it first and names the rows to fix. Every feature has its tables from the start, so turning one on or off needs no migration.
  • Table and column names: Every sign-in table can take another name or a prefix, and every column but id another name, from the config, and the migrations, sign-in and Protobase’s own queries all use it.
  • Existing users table: Sign-in can use the users table another system keeps in the same database.
  • Users page: Admins find people, set roles, block them, add accounts and invite people by email.
  • Account page: Everyone signed in has an account page for their profile, sign-in and security, devices, connected apps and access tokens, and you add, hide or reorder its tabs.
  • Password reset: People reset a forgotten password through an emailed link.
  • Password changes: Changing the password signs out every other device and MCP client, and emails the account that its password changed. Guesses at the current password are limited for each account.
  • Leaked passwords: New passwords that appear in a known data breach are refused, when the app turns the check on.
  • Emailed sign-in codes: People sign in with a code sent to their email. An address with no account is emailed that it has none, so the person tries the one they signed up with. An app can have the sign-in page lead with the code and put the password behind “Use a password”.
  • Changing the address: People move their account to a new email address from the account page, once they enter the code sent there.
  • Deleting the account: People delete their own account from the account page, after confirming it, in the web app and the mobile app. On by default; an app whose accounts an organization’s admins manage turns it off.
  • Open sign-up: Anyone can create an account after confirming an emailed code.
  • Sign-up with the address only: Open sign-up can ask for nothing but the address, so the emailed sign-in code makes a new person’s account on the spot; an invited address still gets the roles it was invited with.
  • Sign-up for email domains: Open sign-up can take only addresses at your company’s email domains, so colleagues make their own account and everyone else still needs an invitation.
  • Passkeys: People sign in with their device’s face or fingerprint unlock, or with a security key.
  • Two-factor authentication: A second step with an authenticator app, backup codes or emailed codes.
  • Emailed confirmation code: Someone without a passkey or a second step confirms it’s them with a code emailed on request, where they are, such as before a secret is shown.
  • Confirming an account change: Adding a passkey, turning on a second step without a password, unlinking a provider, making a personal access token or deleting the account from an older session asks to confirm it’s them in place, never to sign out and sign in again; a first passkey takes the password too.
  • Sign-in policy: Admins choose which sign-in methods are on, off or required, and the server refuses a policy that would lock people out.
  • GitHub and social sign-in: People sign in with GitHub or another social provider.
  • Sign-in links: A link signs someone in with a sign-in provider at once, without the sign-in page.
  • Connected accounts: People link GitHub or another sign-in provider to their account from the account page.
  • SAML sign-in: People sign in through any SAML provider.
  • OpenID Connect providers: A host adds OpenID Connect providers for people who already have an account, each with its own id, name and ways to sign in.
  • Devices: A provider that signs in phones links each device as an account of its own, which the person signs out for good from the Devices tab.
  • Token sign-in: A client that holds a fresh ID token from that provider for this app signs in with it once, in place of an emailed code, and gets the app’s own session, with the app’s second step when one is on.
  • Being an OpenID provider: The app vouches for its people’s verified addresses to other apps its admin registers, or its config declares, such as its own phone app, which sign them in without asking them to allow it, and lets a phone app get a sign-in token for each of those apps, or for any app at the origins it names by pattern, without a browser.
  • Grant subjects: Each sign-in of a phone app gets a subject of its own instead of the person’s id, and names its device, so the apps it signs in to see every device apart.
  • Staff sign-in: The team that runs an app signs in as a person to help them, with a reason and a log entry.
  • Roles: A user holds one or more roles and switches between them without signing in again.
  • Organizations: People work in one organization at a time, see only its records, and are invited with their own roles.
  • First organization (beta): People outside any organization name their first one, called by your app’s word such as workspace, in one step, or join one they are invited to, and land on the start address your app sets. The screen says what it is doing while it creates or joins, and lets them try again after a network failure.
  • Status (beta): People set themselves busy or do not disturb, with a text of their own such as “Having lunch” and a time it clears, from the user menu; the people they share an organization with see it beside their name, with your app’s online or away mark on the members page and in the sidebar.
  • API tokens: A signed-in session gets short-lived tokens for the API.
  • Immediate revocation: A ban, removed role or ended session takes effect on the next request.
  • Signing key rotation: The keys that sign the tokens are replaced every 30 days on their own, and old ones keep verifying the tokens they signed for a week.
  • Changing the secret: The app’s secret can change while the signing keys keep signing, by listing the old secret beside the new one.
  • Tokens for scripts: A token for an existing user, for scripts and curl, in any organization they work in.
  • Personal access tokens: People make long-lived tokens on their account page for a script to call the API as them, see when each was last used, and revoke any of them. The app keeps only each token’s hash.
  • OAuth tokens for the API (beta): A phone, watch or other app of your own signs people in through the app’s own sign-in and calls the API as them with a bearer token, until they disconnect it.
  • Several origins: One app works on several domains, such as its own address and a custom domain.
  • Sign-in rate limits: Sign-in and code requests are limited per client address, also behind a proxy.