thelastapi
Get started free

Sign-in

Email and password, magic links, Google and GitHub sign-in, per environment, without building auth yourself.

How to add sign-in to a Next.js app

Add sign-in to a Next.js app with one command using thelastapi to manage user sessions, email auth, and Google or GitHub logins.

Sign-in

Add GitHub sign-in to your app

Learn how to add GitHub sign-in to your application using thelastapi, from configuring your GitHub OAuth app to handling sessions in code.

Sign-in

Add Google sign-in to your app without your own OAuth app

Add Google sign-in to your app with a single command using shared credentials on thelastapi, skipping Google Cloud console setup entirely.

Sign-in

Add sign-in to an app hosted anywhere

Add authentication to an app hosted anywhere by creating an auth resource, registering your domain with --elsewhere, and loading env vars via one key.

Sign-in

Auth for side projects: build it or use a service?

For a side project, using an authentication service is almost always better than building auth yourself from scratch.

Sign-in

Email and password sign-in with verification codes

Enable email and password sign-in with one-time verification codes using thelastapi auth settings, shared email delivery, or custom SMTP.

Sign-in

Magic link sign-in without building it yourself

Implement magic link authentication with a managed sign-in service, configurable link lifetimes, and automated session cookies without building auth code.

Sign-in

OAuth callback URLs explained

An OAuth callback URL is the endpoint in your application where an identity provider redirects users with an authorization code after they sign in.

Sign-in

Restrict sign-up to your company's email domain

Restrict sign-up to your company's email domain by setting allowed_email_domains with the CLI or API to block unauthorized user registrations.

Sign-in

See who signed up: your users, without a production query

List the users of your app on thelastapi by reading your project database with a read-only key or exporting your data, without risking production writes.

Sign-in

Separate development and production sign-in

Separate development and production sign-in by isolating user tables, session cookies, and allowed origins across distinct environments.

Sign-in

Use your own OAuth app for Google sign-in

Use your own Google OAuth client ID and secret in thelastapi to show your company's name and branding on the Google sign-in consent screen.

Sign-in