@avvyr/storefront-sdk - v0.19.0
    Preparing search index...

    Interface AuthMethods

    GET /auth/methods: which sign-in options the store has turned on.

    interface AuthMethods {
        google: { clientId: string; scope: string } | null;
        klarna:
            | {
                clientId: string;
                environment: "production"
                | "playground";
                scope: string;
            }
            | null;
        magicLink: boolean;
        microsoft: | {
            accounts: "all"
            | "work"
            | "personal";
            authority: string;
            clientId: string;
            scope: string;
        }
        | null;
        password: boolean;
        registration: { b2b: boolean; b2c: boolean };
    }
    Index
    google: { clientId: string; scope: string } | null

    Sign in with Google, or null. Use Google Identity Services (https://accounts.google.com/gsi/client) with client_id: clientId; its callback's credential is the id_token.

    klarna:
        | {
            clientId: string;
            environment: "production"
            | "playground";
            scope: string;
        }
        | null

    Sign in with Klarna, or null. Pass clientId and environment to Klarna's Web SDK (https://js.klarna.com/web-sdk/v1/klarna.js) and scope to its identity button, then send signin.user_account_linking.user_account_linking_id_token to auth.signInWithProvider("klarna", …).

    magicLink: boolean

    Magic link / emailed code sign-in. Always true: it confirms the email and recovers lost passwords.

    microsoft:
        | {
            accounts: "all"
            | "work"
            | "personal";
            authority: string;
            clientId: string;
            scope: string;
        }
        | null

    Sign in with Microsoft, or null. Run an auth code + PKCE sign-in against authority with clientId and scope (e.g. with MSAL: loginPopup / loginRedirect) and send the resulting idToken. accounts says which accounts the store accepts.

    password: boolean

    Email + password sign-in. false when the store chose "Magic link only".

    registration: { b2b: boolean; b2c: boolean }

    Whether self-registration is open, per customer type.