Documentation
    Preparing search index...

    Authentication adapter implementing the Supabase SDK ecosystem. Acts as a centralized bridge handling signup, tokens, and middleware enforcement.

    Hierarchy

    • AbstractAuthAdapter
      • SupabaseAuthAdapter
    Index

    Constructors

    • Parameters

      • params: AuthParameters = {}

      Returns SupabaseAuthAdapter

    Properties

    _alias: string
    _client: any
    _params: AuthParameters
    UserClass: typeof User

    The User class reference to be used by the adapter.

    Accessors

    • get alias(): string

      Returns string

    • set alias(alias: string): void

      Parameters

      • alias: string

      Returns void

    • get client(): any

      Returns the underlying Supabase Client instance.

      Returns any

    Methods

    • (Unimplemented) Destroys the user context inside Supabase.

      Parameters

      • user: User

        Target user.

      Returns Promise<any>

    • Resolves a raw Bearer token via the Supabase Auth API (getUser).

      Parameters

      • bearer: string

        Raw JWT string.

      Returns Promise<any>

      The decoded user object.

      If verification fails.

    • Returns the pluggable endpoint handler function for this adapter, if any.

      Returns any

      The EndpointHandler callback or null.

    • Retrieves a configuration parameter.

      Parameters

      • key: AuthParametersKeys

        The parameter key to fetch.

      Returns any

      The corresponding configuration value.

    • Express middleware capturing Bearer JWT tokens to execute auth verification.

      Returns ApiMiddleware

      The middleware function.

    • Initiates password recovery/reset process for a user.

      Parameters

      • email: string

        The user email.

      • OptionalredirectTo: string

        Optional redirect destination.

      Returns Promise<any>

    • Obtains a new JWT access token by exchanging the persistent refresh token.

      Parameters

      • refreshToken: string

        The token.

      Returns Promise<any>

      Resolves the token packet.

    • Register new user in authentication

      Parameters

      • user: User
      • OptionalclearPassword: string

      Returns Promise<any>

      user unique id

    • Instructs the Supabase client to destroy the current session.

      Parameters

      • token: string

        Target token.

      Returns Promise<false | undefined>

    • Merges specific attributes into the Supabase user_metadata field using the admin API.

      Parameters

      • id: string

        The target user ID.

      • claims: any

        The payload of new claims.

      Returns Promise<any>

      Resolved updated user wrapper.

    • Assigns a configuration parameter for the adapter.

      Parameters

      • key: AuthParametersKeys

        The parameter key.

      • value: any

        The parameter value.

      Returns void

    • Disconnects and destroys the active session context.

      Returns Promise<any>

      True if successful.

    • Executes a direct login / session instantiation via signInWithPassword.

      Parameters

      • login: string

        Email string.

      • password: string

        Raw password.

      Returns Promise<false | { session: any; user: any }>

      Resolved user session.

    • Modifies a Supabase Auth user record.

      Parameters

      • user: User

        Target user.

      • updatable: any

        The delta properties.

      Returns Promise<any>

    • Initializes a new instance securely with Supabase configuration keys.

      Parameters

      • config: any

        Must contain supabaseUrl and supabaseKey.

      Returns SupabaseAuthAdapter | null

      A constructed SupabaseAuthAdapter or null on invalid params.