Skip to Content

CustomerAuthentication

type CustomerAuthentication = | { session: CustomerSession; type: "session"; } | { getIdentityToken: CustomerIdentityTokenProvider; type: "identity-token-provider"; } | { customerId: string; projectId: string; sandboxSecret: string; type: "synthetic"; };

How a client authenticates its customer.

Union Members

Type Literal

{ session: CustomerSession; type: "session"; }

A session the app already holds, such as one its server issued.


Type Literal

{ getIdentityToken: CustomerIdentityTokenProvider; type: "identity-token-provider"; }

A token from the project’s identity provider, exchanged for a session on first use.


Type Literal

{ customerId: string; projectId: string; sandboxSecret: string; type: "synthetic"; }

Sent with every request. The client has no session to establish or refresh, and is always in sandbox mode.

Last updated on