Two things every request needs
Authorization: Bearer <token>— the JWT returned by login.X-Spree-Seller-Id: <seller_id>— which seller the signed-in user is acting as.
GET /api/v3/seller/me, because that is what tells the panel which seller to name.
Signing in
The refresh token is not in the response body. It is set as an HttpOnly cookie scoped to
/api/v3/seller/auth, so a session issued for the seller panel cannot be redeemed on any other surface.Membership is required, not just credentials
A marketplace’s own staff share the same user class as sellers. Authenticating is therefore not enough: a user who runs no seller is refused with401, because issuing a token would hand out an audience its holder can do nothing with.
Choosing a seller
A person may run more than one seller — so capability is per seller, and a request that names none has no tenant at all.Token audiences
Every Spree JWT carries an audience, and each surface accepts only its own:
An admin token presented to the Seller API is a
401, and a seller token presented to the Admin API is likewise refused. The refresh endpoint narrows by audience too, so a refresh token minted elsewhere cannot be exchanged for a seller session.
Refreshing a session
Authorization header — the cookie alone authenticates the call, and a fresh refresh cookie is rotated in.
Membership is re-checked here, so a user whose last seller role was revoked mid-session is refused at their next refresh rather than continuing until the access token happens to expire.
Signing out
Accepting an invitation
Someone invited onto a seller’s team arrives through an emailed link carrying an invitation ID and a token. Both acceptance endpoints are unauthenticated — the link is the credential.password sets a new password when no account exists for that address; when one does, the same field is how the person proves the account is theirs.
A wrong token is indistinguishable from an unknown invitation: both answer
404. So does an invitation onto the marketplace’s own staff rather than a seller.Rate limiting
Sign-in, refresh, provider discovery, and invitation acceptance are all rate limited, and answer429 with a rate_limit_exceeded code when a client exceeds the window.
