supa/auth

Types

pub type Reason {
  Reason(error: String, message: String)
}

Constructors

  • Reason(error: String, message: String)
pub type Session {
  Session(
    access_token: String,
    expires_at: Int,
    expires_in: Int,
    refresh_token: String,
    token_type: String,
  )
}

Constructors

  • Session(
      access_token: String,
      expires_at: Int,
      expires_in: Int,
      refresh_token: String,
      token_type: String,
    )
pub type User {
  User(created_at: String, email: String, id: String)
}

Constructors

  • User(created_at: String, email: String, id: String)

Functions

pub fn sign_in_with_otp(
  client: Client,
  email_address: String,
  create_user: Bool,
) -> Effect(Nil)
pub fn verify_decoder(
  raw: Dynamic,
) -> Result(#(Session, User), List(DecodeError))
pub fn verify_otp(
  client: Client,
  email_address: String,
  token: String,
) -> Effect(#(Session, User))
pub fn verify_to_json(session: Session, user: User) -> Json
Search Document