InterfaceIAuthorizationBeta

Component that allows you to check whether Lens Studio is authorized, as well as get authorization. Requires snap_auth_token in the module.json of your plugin.

interface IAuthorization {
    isAuthorized: boolean;
    onAuthorizationChange: signal1<boolean, void>;
    authorize(): void;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
}

Hierarchy (view full)

Properties

isAuthorized: boolean

Current authorization state.

onAuthorizationChange: signal1<boolean, void>

Signal that responds to changes in authorization state.

Methods

  • Beta

    Initiate the authorization flow.

    Returns void