@inrupt/solid-client-authn-node
    Preparing search index...

    Function getSessionFromStorage

    Retrieve a Session from the given storage based on its session ID. If possible, the Session is logged in before it is returned, so that session.fetch may access private Resources without any additional interaction.

    If no storage is provided, a default in-memory storage will be used. It is instantiated once on load, and is shared across all the sessions. Since it is only available in memory, the storage is lost when the code stops running.

    A Session is available in storage as soon as it logged in once, and it is removed from storage on logout.

    The ID of the Session to retrieve.

    The storage where the Session can be found.

    A session object, authenticated if possible, or undefined if no Session in storage matches the given ID.

    • Retrieve a Session from the given storage based on its session ID. If possible, the Session is logged in before it is returned, so that session.fetch may access private Resources without any additional interaction.

      If no storage is provided, a default in-memory storage will be used. It is instantiated once on load, and is shared across all the sessions. Since it is only available in memory, the storage is lost when the code stops running.

      A Session is available in storage as soon as it logged in once, and it is removed from storage on logout.

      Parameters

      • sessionId: string

        The ID of the Session to retrieve.

      • Optionaloptions: Partial<
            {
                onNewRefreshToken: (newToken: string) => unknown;
                refreshSession: boolean;
                storage: IStorage;
            },
        >

        Options to control the session loading behavior.

      Returns Promise<undefined | Session>

      A Session object, potentially authenticated, or undefined if no Session in storage matches the given ID.

      2.3.0

    • Retrieve a Session from the given storage based on its session ID. If possible, the Session is logged in before it is returned, so that session.fetch may access private Resources without any additional interaction.

      If no storage is provided, a default in-memory storage will be used. It is instantiated once on load, and is shared across all the sessions. Since it is only available in memory, the storage is lost when the code stops running.

      A Session is available in storage as soon as it logged in once, and it is removed from storage on logout.

      Parameters

      • sessionId: string

        The ID of the Session to retrieve.

      • Optionalstorage: IStorage

        The storage where the Session can be found.

      • OptionalonNewRefreshToken: (newToken: string) => unknown

        A callback to call on refresh token rotation.

      • Optionalrefresh: boolean

      Returns Promise<undefined | Session>

      A session object, authenticated if possible, or undefined if no Session in storage matches the given ID.

      use the options object argument instead.