BlueForge Docs

client.auth.signIn

Sign in with email and password.

Signature

class Client {
  auth: {
    signIn(input: { email: string; password: string }): Promise<{ user: AuthUser; session: AuthSession }>
  }
}

Parameters

NameTypeRequiredNotes
email
stringyesUser email
password
stringyesUser password

Throws

ErrorCondition
AuthError
Invalid email or password
RateLimitError
Too many attempts (5/min)

Examples

const { user, session } = await bf.auth.signIn({
  email: 'alice@example.com',
  password: 'secure-pass-123',
})

Pitfalls

  • Rate limited — 5 failed attempts per minute locks the account for 15 minutes
  • Session token — the returned session token must be stored client-side for subsequent requests

See also

{auto-injected}

Tested against

{auto-injected}