Home > @shopware-pwa/shopware-6-client > login

# login() function

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Login user to shopware instance.

Signature:

export declare function login({ username, password, }?: {
    username?: string;
    password?: string;
}): Promise<ContextTokenResponse>;

# Parameters

Parameter Type Description
{ username, password, } {
username?: string;
password?: string;
}

Returns:

Promise<ContextTokenResponse>

# Exceptions

ClientApiError