Skip to content
Get started

Register

client.auth.register(AuthRegisterParams { email, password, password_confirm } body, RequestOptionsoptions?): AuthRegisterResponse { access, refresh, user }
POST/api/auth/register/

Create an account with email and password.

ParametersExpand Collapse
body: AuthRegisterParams { email, password, password_confirm }
email: string
formatemail
minLength1
password: string
minLength8
maxLength128
password_confirm: string
minLength8
maxLength128
ReturnsExpand Collapse
AuthRegisterResponse { access, refresh, user }
access: string
refresh: string
user: User { id, email, email_verified }
id: number
email: string
formatemail
maxLength254
email_verified?: boolean
Register
import OvermindLab from 'overmind-lab';

const client = new OvermindLab();

const response = await client.auth.register({
  email: 'dev@stainless.com',
  password: 'xxxxxxxx',
  password_confirm: 'xxxxxxxx',
});

console.log(response.access);
{
  "access": "access",
  "refresh": "refresh",
  "user": {
    "id": 0,
    "email": "dev@stainless.com",
    "email_verified": true
  }
}
Returns Examples
{
  "access": "access",
  "refresh": "refresh",
  "user": {
    "id": 0,
    "email": "dev@stainless.com",
    "email_verified": true
  }
}