Globus SDK for JavaScript
    Preparing search index...

    Type Alias AuthorizationManagerConfiguration

    type AuthorizationManagerConfiguration = {
        client: string;
        events?: Partial<
            {
                [Event in keyof AuthorizationManager["events"]]: Parameters<
                    AuthorizationManager["events"][Event]["addListener"],
                >[0]
            },
        >;
        redirect?: string;
        scopes?: string;
        storage?: Storage;
        storageKeyPrefix?: string;
        transport?: keyof typeof TRANSPORTS;
    }
    Index
    client: string
    events?: Partial<
        {
            [Event in keyof AuthorizationManager["events"]]: Parameters<
                AuthorizationManager["events"][Event]["addListener"],
            >[0]
        },
    >

    Provide an object with event listeners to attach to the instance. This is useful if you need to listen to events that might dispatch immediately after the creation of the instance (constructor), e.g., the authenticated.

    redirect?: string

    The redirect URL used by the browser transports (redirect, popup); This is where you will call manager.handleCodeRedirect().

    Required when using login(), prompt(), handleCodeRedirect(), or handleErrorResponse() (an error is thrown if it is missing). It is not required for applications that only manage existing tokens, or that use startAuthorization() and completeAuthorization() (e.g., native applications in Node.js).

    scopes?: string
    storage?: Storage

    The storage system used by the AuthorizationManager.

    By default, the AuthorizationManager uses an in-memory storage, this option is secure by default.

    If you want to persist the state of the AuthorizationManager, you can use localStorage, or provide your own storage system. It is important to note that using the localStorage, or any persistant storage option will preserve authorization and refresh tokens of users. Best practices for ensuring the security of your application should be followed to protect this data (e.g., ensuring XSS protection).

    MemoryStorage
    
    storageKeyPrefix?: string

    The prefix used for keys of items stored by the instance.

    Use this option to isolate tokens when a single storage is shared by multiple instances that use the same client, e.g., a file in a user's home directory shared between the sandbox and production Globus environments.

    IMPORTANT: A prefix should not be the start of another instance's prefix (e.g., client: and client:sandbox:) when they share a storage, otherwise the instance with the shorter prefix will also enumerate (and reset()) the other instance's tokens. Prefer prefixes that differ at the start, e.g., sandbox:client: and production:client:.

    Changing this value for an existing application will "log out" existing users; tokens stored with the previous prefix will not be found.

    ${client}:

    transport?: keyof typeof TRANSPORTS

    The transport method to use for the authorization flow.

    'redirect'