Get the store's sign-in options
const url = 'https://apibase.ecomweb.app/api/v1/public/stores/example/auth/config';const options = {method: 'GET', headers: {'x-storefront-api-key': '<x-storefront-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://apibase.ecomweb.app/api/v1/public/stores/example/auth/config \ --header 'x-storefront-api-key: <x-storefront-api-key>'Returns which sign-in methods the store has turned on and its password rules, so a sign-in form can show the right buttons and hints before the shopper types anything. Rate limited to 20 requests per minute per store and client IP.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The store’s ref, as returned by GET /stores.
Responses
Section titled “Responses”object
The password rules to show before the shopper submits.
object
Minimum password length.
Whether a password must contain a digit.
Whether a password must contain a symbol.
Whether a password must contain an uppercase letter.
Whether sign-up and sign-in with email and password is on.
Whether sign-in with Google is on.
Whether sign-in with a one-time code sent by email is on.
Whether a shopper must verify their email before they can sign in with a password.
Example generated
{ "password_policy": { "min_length": 1, "require_number": true, "require_symbol": true, "require_uppercase": true }, "password_enabled": true, "google_enabled": true, "otp_enabled": true, "require_email_verification": true}The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}Too many requests; wait a little before retrying.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}