Customer sign-in providers
Google, Apple and Facebook, which customers sign in to the website through, and the shop's own app at each: :connect with its keys — checked with the provider, the secret ones kept sealed and never answered back — :verify and :disconnect. Register the website's redirect_uris in the app first.
List customer sign-in providers
Lists the sign-in providers — google, apple and facebook, in that order — each with the website's app at it, state: "NOT_CONNECTED" where there is none, and the website's callback addresses to register in the app. Neither filters nor sorts.
path Parameters
website_idId of the parent website.
query Parameters
page_sizeRows per page. Over the maximum is clamped, not rejected.
page_tokenOpaque token from a previous next_page_token. A token minted under a different order_by/filter is rejected.
skipRows to skip before the page (AIP-158). skip + page_size is capped at 10000; beyond that is OUT_OF_RANGE.
order_byComma-separated field [asc|desc], at most 3 keys. Default: create_time desc. Sortable: none — this collection serves its documented order only.
filterAIP-160 subset (§8). Filterable: none. A field outside the list is INVALID_ARGUMENT.
List customer sign-in providers › Responses
One page of customer_sign_in_providers.
This page of customer_sign_in_providers, in the requested order.
next_page_tokenOpaque. Absent or empty means this was the last page.
total_sizeRows in the whole filtered collection, not in this page.
Get customer sign-in provider
Reads one sign-in provider and the website's app at it; a provider without an app answers state: "NOT_CONNECTED", an id that is none of the three NOT_FOUND.
path Parameters
website_idId of the parent website.
providerHeaders
If-None-MatchA matching etag answers 304 with no body (§16).
Get customer sign-in provider › Responses
The resource.
nameThe resource name (§5) — the identity of this resource, and the path that addresses it: websites/{website}/cms_pages/{cms_page}. It is the handle to store, not a human label.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
create_timeWhen the resource was created (RFC 3339, UTC).
update_timeWhen the resource last changed (RFC 3339, UTC).
etagVersion of the persisted state. Send it back in If-Match on Update or Delete and the write is rejected with ABORTED if anyone else changed the resource meanwhile (§14).
display_nameThe provider's name, as the shop and its customers read it: Google, Apple, Facebook.
methodThe way to sign in the provider brings, as the website's customers and their connected accounts name it: GOOGLE, APPLE or FACEBOOK.
credential_fieldsWhat :connect asks for, in order: [{key, display_name, secret, multiline}] — key a member of the body's credentials, each one required; display_name its label, as the provider's console names it; secret whether its value is never answered back (only its last four characters, in credential_hints); multiline whether it takes several lines, as Apple's private key does. A form is built of it.
stateWhere the website's app at the provider stands: NOT_CONNECTED — none; CONNECTED — the provider took its keys at the last check; INVALID — it refused them since, or the platform can no longer read them: connect the app again. Customers sign in through a CONNECTED app alone.
credentialsThe keys of the connected app that are no secret, by their key — the client ID, the Services ID, Team ID and Key ID, the App ID — to tell which app is connected. Absent while NOT_CONNECTED.
credential_hintsThe last four characters of each secret key of the app, by its key — of a private key, of its body without the PEM's armour lines — enough to tell which one is connected, never the key. Absent while NOT_CONNECTED, and for a value shorter than 12 characters.
redirect_urisThe website's callback addresses at this provider, one per host of the website: https://{host}/api/auth/provider/{provider}/callback, the platform's host first, then the website's own domain — verified or not yet. The provider sends a customer back only to an address the app registered, so register every one of them in the app, and the new one when the website gets another domain.
connect_timeWhen the app was last connected (:connect). Absent while NOT_CONNECTED.
verify_timeWhen the provider was last asked about the keys — by :connect or :verify. Absent while NOT_CONNECTED.
Connect (customer sign-in provider)
Connects the shop's own app at the provider: {"credentials": {"client_id": "…", …}} — every key of its credential_fields, each a string; surrounding whitespace is dropped, and a key of several lines (Apple's private key, the whole PEM) keeps its line breaks. The platform asks the provider whether it takes the keys, keeps the secret ones sealed and answers only their last four characters (credential_hints); the app is CONNECTED. Connecting again — other keys, another app — replaces it. Refused, nothing is written: keys the provider refuses, or that are not what it asks for — a key it does not know, one missing, one empty, one of one line with a space inside — INVALID_ARGUMENT on credentials.<key>; the provider not reached UNAVAILABLE; the platform not able to keep keys FAILED_PRECONDITION SECRETS_NOT_CONFIGURED, or to reach the provider SIGN_IN_PROVIDER_NOT_CONFIGURED. Answers the provider with the app.
path Parameters
website_idId of the parent website.
providerConnect (customer sign-in provider) › Request Body optional
Connect (customer sign-in provider) › Responses
The affected resource, or the method’s own response object (§10).
Disconnect (customer sign-in provider)
Disconnects the website's app at the provider: its keys are deleted, and customers no longer sign in through it. Takes no body; a provider with no app answers as it is. Works while the website's customer accounts are off too. Answers the provider, NOT_CONNECTED.
path Parameters
website_idId of the parent website.
providerDisconnect (customer sign-in provider) › Request Body optional
Disconnect (customer sign-in provider) › Responses
The affected resource, or the method’s own response object (§10).
Verify (customer sign-in provider)
Checks the website's app with the provider again. Takes no body. Keys it still takes keep the app CONNECTED, verify_time now; keys it refuses now, or that the platform can no longer read, make it INVALID — customers no longer sign in through it until it is connected again — an answer, not an error. The provider not reached answers UNAVAILABLE and changes nothing; no app FAILED_PRECONDITION SIGN_IN_PROVIDER_NOT_CONNECTED. Answers the provider with the app.
path Parameters
website_idId of the parent website.
providerVerify (customer sign-in provider) › Request Body optional
Verify (customer sign-in provider) › Responses
The affected resource, or the method’s own response object (§10).