Auth Methods
All available methods on postbase.auth — sign up, sign in, OTP, session, user management.
Auth Methods
All authentication methods are available on postbase.auth.
signUp({ email, password })— Create a new user accountsignInWithPassword({ email, password })— Sign in with email + passwordsignInWithOtp({ email })— Send a magic link emailsignOut()— Invalidate all sessionsgetSession()— Get the current session (access + refresh tokens)getUser()— Get the current user from the access tokenrefreshSession()— Exchange refresh token for a new access tokenupdateUser({ name, image, metadata })— Update current user profileonAuthStateChange(callback)— Subscribe to sign-in / sign-out eventsadmin.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)