Skip to content
exwave.Docs

Auth

Exwave Auth adds user accounts to your app or your game’s website. People sign up, verify their email, sign in and reset their password on pages in your own app. Exwave stores the accounts and sends the emails, so you don’t run any of it yourself.

  • Sign-up with email verification, and sign-in with an email or a username.
  • Password reset by email, and sign-out on one device or on every device.
  • Your platform’s password rules, checked as people type.
  • Sessions that renew themselves, so people stay signed in.
  • Verification and password reset emails with your branding, which you edit in Nexus.

Publishable key. A key that starts with exw_pk_, in Nexus → Auth. It tells the libraries which platform to use. It isn’t secret, so you can put it in browser code.

Site URL and Redirect URLs. The addresses that verification and password reset emails may link to. You set them in Nexus → Auth → Settings. While you develop, add http://localhost:3000 (Next.js) or http://localhost:5173 (Vite). Emails that don’t say where to link, such as resets you send from Nexus, open the Site URL. Without one, they aren’t sent.

Session. What keeps someone signed in. With Next.js, it’s in an encrypted cookie that only your server can read. In a single-page app, the browser keeps it.

Local mock. A stand-in for Exwave Auth that runs on your machine. Use it before you have a platform, and in your tests. See Local mock.

@exwave-nexus/auth is the JavaScript client. It works with any framework, or none. React and Next.js each have a package built on it: @exwave-nexus/auth-react and @exwave-nexus/auth-nextjs. Using another framework? Email [email protected] to ask us to support it.

Choose how much you build yourself:

  1. Components. Ready-made sign-in, sign-up, verification and password reset screens, copied into your app so you can change them.
  2. Hooks. The logic behind those screens, for when you write your own.
  3. The client. Plain JavaScript calls, with or without a framework.

Your game can use the same accounts. It gets a short-lived player access token (PAT) for the signed-in player, and sends it to your game servers. They check the token to know which player is connecting. A game that runs outside the browser, in an engine or a launcher, signs players in with OpenID Connect. See Games & player access tokens.