Skip to content

Sign-in methods: password, magic link, QR code, passkeys and social logins

Describes PhoenixKit 3.6.1. On an older release? The version menu above has this guide as it was then.

Settings > Authorization decides how people sign in: by password, by a link sent by email, by scanning a code with a phone that is already signed in, with a passkey, or with Google, GitHub or Facebook. It also styles the log-in page.

Where to find it

In the admin sidebar, Settings > Authorization (/admin/settings/authorization). You need the Security settings permission (part of Settings). The page has four tabs, Login Page Branding, Authentication Methods, Sessions and Abuse protection. The first three share one Save Authorization Settings button. Abuse protection (request limits, the email address check and Cloudflare Turnstile) has its own guide.

Login Page Branding

  • Background Image (Desktop) and Background Image (Mobile): Select Image picks one from the media library; Change image and Remove replace or clear it.
  • Background Color: a color or a CSS gradient, for example #1a1a2e or a linear-gradient(...).

Authentication Methods

The Authentication Methods tab: magic link, QR code, Passkeys, login notifications including a new country alert, and OAuth providers The Authentication Methods tab: magic link, QR code, Passkeys, login notifications including a new country alert, and OAuth providers

Sign-in methods, now with passkeys.

The sign-in methods a site offers.

Magic Link

  • Enable Magic Link for login: the log-in page offers Sign in with Magic Link. The person types their email and gets a link that expires in 15 minutes.
  • Enable Magic Link for registration: sign-up without a password. It can’t be ticked while registration is off ((registration disabled)).

QR Code

Enable QR code sign-in (scan from a signed-in phone): the log-in page offers Sign in with QR code. It shows a code; the person scans it with their phone’s camera on a phone that is already signed in, and taps Approve there.

Passkeys

Enable sign-in with a passkey (Face ID, Touch ID, Windows Hello): off by default. The log-in page then offers the person’s passkeys, and each person adds their own on the Security tab of their account settings. A passkey works only on the domain it was made for; the setting names that domain. Turn it on once the site’s address is final. See the Passkeys guide.

Login Notifications

  • Email users when their account is signed in from a new device. A browser is recognized by a device cookie, so a browser update no longer counts as a new device.
  • Email users when their account is signed in from a new country: off by default. It alerts also for a browser the person already uses. The country comes from the IP address, so a VPN can set it off. An account’s first sign-in after this is turned on only records its country.
  • Email users when failed sign-ins on their account cross a threshold, with Failures in one hour that trigger the email (10 unless you change it). At most one such email goes out per account per 24 hours.

While email confirmation is required, these emails go only to accounts that have confirmed their address.

OAuth Providers

  • Enable OAuth (Master Switch): nothing below works while it is off.
  • Google Sign-In, GitHub Sign-In, Facebook Sign-In: one switch per provider.
  • Require the provider to confirm the email address: on by default. While on, signing in with a provider can only join an existing account if the provider says it verified that address. Turning it off lets anyone who gets an address onto a provider account sign in as its owner.

When a provider is switched on, its credentials card appears: Client ID and Client Secret for Google and GitHub, App ID and App Secret for Facebook. Leave a secret blank to keep the one already stored. Each card shows the Callback URL to copy into the provider’s console, with step-by-step setup instructions, and Test Credentials checks them.

The page’s own OAuth Setup Instructions sum it up: enable the provider and save, enter the credentials in the form that appears, save again, then click Test Credentials. Reload OAuth Configuration reloads the stored credentials.

Sessions

  • Enable multiple sessions: any signed-in user can add other accounts (with their password) and switch between them from the user menu.
  • Record failed sign-ins: stores failed password sign-ins, grouped by identifier, network and hour. They are shown on the person’s own settings page and on the admin Sessions page. Keep records for (days) sets how long (90 unless you change it).

What visitors see

The log-in page (/users/log-in) always has Email or Username and Password, Forgot your password? and Log in, plus Keep me logged in when persistent sessions are allowed (Settings > Users). Below, Or continue with lists the other methods that are on, starting with Sign in with passkey while passkeys are on. A browser that has a passkey for the site also offers it in the email field as the page loads. Create an account shows only while registration is open.

The PhoenixKit sign-in page for the site Nordwind: email or username, password, Keep me logged in, Forgot your password, Log in, Create an account, and Sign in with Magic Link The PhoenixKit sign-in page for the site Nordwind: email or username, password, Keep me logged in, Forgot your password, Log in, Create an account, and Sign in with Magic Link

What visitors see: the sign-in page with the methods that are turned on.

What it doesn’t do

  • There is no switch to turn off password sign-in.
  • Social logins need the matching sign-in libraries installed in the app; the page notes that OAuth providers require ueberauth dependencies.
  • Who may register at all is set in Settings > Users, not here.