API referenceShop sign in

Shop sign in

7 operations. Every schema and example on this page is generated from the platform contract.

Her sign-in at a shop: the code she typed proves her email and signs her in there.

Dark behind SHOP_SIGN_IN (off: 404). Five tries per code, once only. Right: her one Membber identity for that address (made if new, with no shop) and a 90-day httpOnly, Secure, SameSite=Lax, host-only cookie for THIS shop.

auth none, publicop checkShopSignInCodeidempotent retryrate limitederrors

Request body

shopstringrequired

Her shop: its handle (flourandbloom).

emailstringrequired
ticketstringrequired
codestringrequired
curl -X POST "https://www.membber.com/api/v1/shop-sign-in/check" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
  -H "Content-Type: application/json" \
  -d '{
    "shop": "<shop>",
    "email": "alex@example.com",
    "ticket": "<ticket>",
    "code": "EXAMPLE10"
  }'
Response, 200
"<value>"

Her sign-in at a shop: email her a six-digit code.

Dark behind SHOP_SIGN_IN (off: 404). Every address gets a code and the same answer, whether or not it has orders or an account. Strictly limited per address and per caller (a limiter that cannot answer refuses).

auth none, publicop sendShopSignInCodeidempotent retryrate limitederrors

Request body

shopstringrequired

Her shop: its handle (flourandbloom).

emailstringrequired
curl -X POST "https://www.membber.com/api/v1/shop-sign-in/code" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
  -H "Content-Type: application/json" \
  -d '{
    "shop": "<shop>",
    "email": "alex@example.com"
  }'
Response, 200
"<value>"

Her browser: off to Google’s account chooser, to sign in at this shop.

Dark behind SHOP_SIGN_IN (off: 404). Sets a 10-minute httpOnly SameSite=Lax nonce cookie on this host and answers 303 to Google. With SHOP_SIGN_IN_GOOGLE off, 303 straight back to `back`.

auth none, publicop startShopGoogleSignInrate limitederrors

Parameters

shopstringqueryrequired

Her shop: its handle (flourandbloom).

backstringqueryoptional

A path on this host to come back to.

Response, 200

resultenumrequired

Always a 303: the body is what it would say.

redirect
curl -G "https://www.membber.com/api/v1/shop-sign-in/google" \
  --data-urlencode "shop=flourandbloom" \
  --data-urlencode "back=/"
Response, 200
{
  "result": "redirect"
}

Google’s form post: her verified email proves her, then one sealed hand-off back to the shop’s host.

Dark behind SHOP_SIGN_IN (off: 404). The one address registered on the Membber Google client. The token is checked against Google’s keys and the Membber web client, its nonce against the sealed state, and its email must be verified.

auth none, publicop shopGoogleSignInCallbackidempotent retryrate limitederrors

Response, 200

resultenumrequired

Always a 303: the body is what it would say.

redirect
curl -X POST "https://www.membber.com/api/v1/shop-sign-in/google/callback" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678"
Response, 200
{
  "result": "redirect"
}

Back on the shop’s host: the hand-off and this browser’s nonce sign her in there, once.

Dark behind SHOP_SIGN_IN (off: 404). Two minutes, once, this browser and this host only; then 303 back.

auth none, publicop finishShopGoogleSignInrate limitederrors

Parameters

hstringqueryrequired

Response, 200

resultenumrequired

Always a 303: the body is what it would say.

redirect
curl -G "https://www.membber.com/api/v1/shop-sign-in/google/finish" \
  --data-urlencode "h=<h>"
Response, 200
{
  "result": "redirect"
}

Who she is at this shop, from this shop’s own session cookie: her first name, initial and list, or nobody.

Dark behind SHOP_SIGN_IN (off: 404). Nothing else about her is ever answered.

auth none, publicop getShopSignInMerate limitederrors

Parameters

shopstringqueryrequired

Her shop: its handle (flourandbloom).

curl -G "https://www.membber.com/api/v1/shop-sign-in/me" \
  --data-urlencode "shop=flourandbloom"
Response, 200
"<value>"

Her sessions at this shop end: this browser’s cookie is cleared, and every copy of it is refused from now on.

Dark behind SHOP_SIGN_IN (off: 404). This shop only; her own page’s post only (Origin, or Sec-Fetch-Site: same-origin). Her Sign out is kept on the server, so a session issued before it is refused on every read.

auth none, publicop shopSignOutidempotent retryrate limitederrors

Request body

shopstringrequired

Her shop: its handle (flourandbloom).

curl -X POST "https://www.membber.com/api/v1/shop-sign-in/sign-out" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
  -H "Content-Type: application/json" \
  -d '{
    "shop": "<shop>"
  }'
Response, 200
"<value>"
WhatsApp
Book a Call
Get Started
Shop sign in API | Membber Developers