Documentation
    Preparing search index...

    Class AbstractAuthAdapterAbstract

    Abstract base class that defines the contract for all authentication adapters. Implementations should adapt standard authentication methods to specific providers (e.g. Firebase, Supabase, basic auth).

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    _alias: string = ''
    _params: AuthParameters = {}
    UserClass: typeof User = 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

    Methods

    • Hard-deletes a user from the authentication provider.

      Parameters

      • user: User

        The User to delete.

      Returns Promise<any>

      A promise resolving on successful deletion.

    • Validates and decodes an incoming authentication token.

      Parameters

      • token: string

        The raw token string (e.g. JWT).

      Returns any

      The decoded token data payload.

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

      Returns any

      The EndpointHandler callback or null.

    • Retrieves a configuration parameter.

      Parameters

      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>

    • Refreshes an expired access token using a valid refresh token.

      Parameters

      • refreshToken: string

        The refresh token string.

      Returns Promise<any>

      A promise resolving to the new access token payload.

    • Registers a new user directly in the authentication provider.

      Parameters

      • user: User

        The User object.

      • OptionalclearPassword: string

        The plaintext password.

      Returns Promise<any>

      A promise resolving to the registration response.

    • Invalidates a specific access token explicitly.

      Parameters

      • token: string

        The token string to revoke.

      Returns any

      Action response from the provider.

    • Injects custom claims (e.g. role, tenant info) into the user's token structure.

      Parameters

      • id: string

        The user ID.

      • claims: any

        The payload of claims to merge.

      Returns any

      Action response from the provider.

    • Assigns a configuration parameter for the adapter.

      Parameters

      Returns void

    • Terminates the current authentication session.

      Parameters

      • user: User

        The User footprint.

      Returns Promise<any>

      A promise resolving to the provider's signout response.

    • Authenticates a user by login and password (generates tokens).

      Parameters

      • login: string

        User's email or login name.

      • password: string

        Plaintext password.

      Returns Promise<any>

      A promise resolving to the token payload.

    • Updates user credentials or metadata within the external auth provider.

      Parameters

      • user: User

        The User to modify.

      • updatable: any

        The delta payload of properties to update.

      Returns Promise<any>

      A promise resolving when the update completes.