Docs

You are viewing an archived version of the docs.Go to latest version

Client

The Client object keeps track of the authenticated sessions in the current device. The device can be a browser, a native application or any other medium that is usually the requesting part in a request/response architecture.

The Client object also holds information about any sign in or sign up attempts that might be in progress, tracking the sign in or sign up progress.

Properties

  • Name
    signIn
    Type
    SignIn | null
    Description

    The current sign in attempt, or null if there is none.

  • Name
    signUp
    Type
    SignUp | null
    Description

    The current sign up attempt, or null if there is none.

  • Name
    sessions
    Type
    Session[]
    Description

    A list of sessions that have been created on this client.

  • Name
    activeSessions
    Type
    Session[]
    Description

    A list of active sessions on this client.

  • Name
    lastActiveSessionId
    Type
    string
    Description

    Unique identifier of the last active Session on this client.

  • Name
    updatedAt
    Type
    Date
    Description

    Timestamp of last update for the client.

function isNew(): boolean;

Returns true if this client hasn't been saved (created) yet in the Frontend API. Returns false otherwise.

create()

function create(): Promise<Client>;

Creates a new client for the current instance along with its cookie.

destroy()

function destroy(): Promise<void>;

Deletes the client. All sessions will be reset.

Feedback

What did you think of this content?

Last updated on