Sign-in for game developers

Players want to play first and make an account later. auth4.dev is built around that, so you can spend your time on the game instead of on account systems.

Why it suits games

What your players see

Hosted login works the same in a browser game, a launcher or on a phone next to a console. These are the pages your players see, in the default theme and with a game's own branding. You set the colour, logo and page text in the console. Brand the hosted pages

The Lumen Drift sign-in page on a phone, in the default auth4.dev theme with the green accent and no custom logo. It asks the player to choose how to sign in to their Moonmoth Games account, with buttons to continue with email, Discord or Steam.The Lumen Drift sign-in page on a desktop browser, in the default auth4.dev theme with the green accent and no custom logo. It asks the player to choose how to sign in to their Moonmoth Games account, with buttons to continue with email, Discord or Steam.

Sign-in method chooser, default theme

The sign-in page lists the methods you turn on for the application, such as email codes, Discord and Steam. Add a Steam button

The "Check your email" step on a phone, in the default auth4.dev theme with the green accent and no custom logo. It says a 6-digit code was sent to nova@example.com and shows a field for the code with a Verify code button.The "Check your email" step on a desktop browser, in the default auth4.dev theme with the green accent and no custom logo. It says a 6-digit code was sent to nova@example.com and shows a field for the code with a Verify code button.

Email code entry, default theme

The player enters the six-digit code from their email. It works once, for ten minutes. Email codes

The "Add your email" step after a Steam sign-in on a phone, in the default auth4.dev theme with the green accent and no custom logo. It asks the player who just signed in with Steam for an email address, with an email field, a Send code button and a link to use a different sign-in method.The "Add your email" step after a Steam sign-in on a desktop browser, in the default auth4.dev theme with the green accent and no custom logo. It asks the player who just signed in with Steam for an email address, with an email field, a Send code button and a link to use a different sign-in method.

Steam 'Add your email' step, default theme

Steam doesn't share an email address, so the player can be asked to add and verify one before returning to your game. The verified email step

The "Save your guest progress" page on a phone, in the default auth4.dev theme with the green accent and no custom logo. It offers to keep a guest player's progress by linking an email address, Discord or Steam, or to skip for now.The "Save your guest progress" page on a desktop browser, in the default auth4.dev theme with the green accent and no custom logo. It offers to keep a guest player's progress by linking an email address, Discord or Steam, or to skip for now.

Guest upgrade, default theme

A guest keeps their progress and user ID by linking an email address, Discord or Steam. Guest upgrade paths

The device approval page on a phone, in the default auth4.dev theme with the green accent and no custom logo. It asks the signed-in player to check that their console shows the code LMND-7429, lists what Lumen Drift will be able to see, and has Approve and Deny buttons.The device approval page on a desktop browser, in the default auth4.dev theme with the green accent and no custom logo. It asks the signed-in player to check that their console shows the code LMND-7429, lists what Lumen Drift will be able to see, and has Approve and Deny buttons.

Device approval, default theme

On a phone or PC, the player checks the code their console shows and approves the sign-in. Device sign-in

The Lumen Drift sign-in page on a phone, branded for Lumen Drift with its violet accent, crescent-moon logo and welcome text. It asks the player to choose how to sign in to their Moonmoth Games account, with buttons to continue with email, Discord or Steam.The Lumen Drift sign-in page on a desktop browser, branded for Lumen Drift with its violet accent, crescent-moon logo and welcome text. It asks the player to choose how to sign in to their Moonmoth Games account, with buttons to continue with email, Discord or Steam.

Sign-in method chooser, branded for Lumen Drift

The sign-in page lists the methods you turn on for the application, such as email codes, Discord and Steam. Add a Steam button

The "Check your email" step on a phone, branded for Lumen Drift with its violet accent, crescent-moon logo and welcome text. It says a 6-digit code was sent to nova@example.com and shows a field for the code with a Verify code button.The "Check your email" step on a desktop browser, branded for Lumen Drift with its violet accent, crescent-moon logo and welcome text. It says a 6-digit code was sent to nova@example.com and shows a field for the code with a Verify code button.

Email code entry, branded for Lumen Drift

The player enters the six-digit code from their email. It works once, for ten minutes. Email codes

The "Add your email" step after a Steam sign-in on a phone, branded for Lumen Drift with its violet accent, crescent-moon logo and welcome text. It asks the player who just signed in with Steam for an email address, with an email field, a Send code button and a link to use a different sign-in method.The "Add your email" step after a Steam sign-in on a desktop browser, branded for Lumen Drift with its violet accent, crescent-moon logo and welcome text. It asks the player who just signed in with Steam for an email address, with an email field, a Send code button and a link to use a different sign-in method.

Steam 'Add your email' step, branded for Lumen Drift

Steam doesn't share an email address, so the player can be asked to add and verify one before returning to your game. The verified email step

The "Save your guest progress" page on a phone, branded for Lumen Drift with its violet accent, crescent-moon logo and welcome text. It offers to keep a guest player's progress by linking an email address, Discord or Steam, or to skip for now.The "Save your guest progress" page on a desktop browser, branded for Lumen Drift with its violet accent, crescent-moon logo and welcome text. It offers to keep a guest player's progress by linking an email address, Discord or Steam, or to skip for now.

Guest upgrade, branded for Lumen Drift

A guest keeps their progress and user ID by linking an email address, Discord or Steam. Guest upgrade paths

The device approval page on a phone, branded for Lumen Drift with its violet accent, crescent-moon logo and welcome text. It asks the signed-in player to check that their console shows the code LMND-7429, lists what Lumen Drift will be able to see, and has Approve and Deny buttons.The device approval page on a desktop browser, branded for Lumen Drift with its violet accent, crescent-moon logo and welcome text. It asks the signed-in player to check that their console shows the code LMND-7429, lists what Lumen Drift will be able to see, and has Approve and Deny buttons.

Device approval, branded for Lumen Drift

On a phone or PC, the player checks the code their console shows and approves the sign-in. Device sign-in

What you get compared with building it yourself

Sign-in for a game is more than a login form. This is the work you take on when you build it yourself, next to what auth4.dev already does. Your game server still verifies tokens and decides what each player may do.

AreaBuilding it yourselfWith auth4.dev
Email sign-inGenerate one-time codes, send and expire them, and rate-limit attempts per address and network.Hosted six-digit email codes with rate limits. Email rate limits
Guest accountsCreate anonymous accounts, then link a real identity later without losing progress or taking over someone else's account.Guest sessions and upgrades that keep the same user ID, with single-use proofs. Upgrade safety rules
Sign-in on devices without a browserImplement device authorization (RFC 8628): user codes, an approval page, polling intervals, slow_down and expiry.Device sign-in with a hosted approval page and per-application device settings. Polling rules
Token signingChoose a token format, sign tokens, publish and rotate signing keys, and verify tokens in every service.RS256 tokens with published signing keys and a server SDK that verifies them. Failures and key rotation
Staying signed inIssue refresh tokens, rotate them on every use and detect a stolen token being reused.Rotating refresh tokens; reuse revokes the whole token family. Refresh rotation
Ending accessTrack sessions so players can sign out and you can revoke a player's access.Sign-out in the SDKs, and session revocation and player disabling in the console. Revocation limits
Player data deletionDelete a player's records everywhere, and clean up abandoned guest accounts.Owner deletion requests in the console, and inactive guests removed after 30 days by default. Deleting a player
Your teamBuild admin tools with roles, and record who changed what.A developer console with owner, admin and viewer roles and an audit log. Team roles

Plan around what isn't included yet

  • No passwords or passkeys on the device approval page. Social sign-in is limited to Discord, Steam, Google, Apple and Microsoft, with no Xbox profile data.
  • The Unity package isn't on OpenUPM or the Unity Asset Store yet; use it from the repository. The web SDKs are on npm.
  • Servers that verify tokens offline accept an access token for up to five minutes after revocation.
  • There are no custom domains or custom claims.

Read all MVP limitations

Try it with your game

Create a project, register a game client for device sign-in, and follow the Unity or server quickstart.