reference

Auth Methods

All available methods on postbase.auth — sign up, sign in, OTP, session, user management.

Published: March 22, 2026Updated: March 22, 2026

Auth Methods

All authentication methods are available on postbase.auth.

  • signUp({ email, password }) — Create a new user account

  • signInWithPassword({ email, password }) — Sign in with email + password

  • signInWithOtp({ email }) — Send a magic link email

  • signOut() — Invalidate all sessions

  • getSession() — Get the current session (access + refresh tokens)

  • getUser() — Get the current user from the access token

  • refreshSession() — Exchange refresh token for a new access token

  • updateUser({ name, image, metadata }) — Update current user profile

  • onAuthStateChange(callback) — Subscribe to sign-in / sign-out events

  • admin.listUsers() — List all users (service key required)

  • admin.createUser({ email, password }) — Create a user (service key required)

  • admin.deleteUser(id) — Delete a user (service key required)