Project Auth V2

Set Project Auth Mode

Changed on

Sets the project's Superwall Auth mode and returns the whole configuration. required needs at least one enabled method, or it is a 409. Turning Superwall Auth on is a 403 until it is available to the project; off always works. Requires projects:write scope.

put/v2/projects/{id}/auth/mode

Request

  • Base URL
    https://api.superwall.com
  • URL
    https://api.superwall.com/v2/projects/{id}/auth/mode
  • Auth
    • HTTP bearer
    • or API key in cookie accounts_superwall_token
    • or HTTP bearer

Path parameters

idstring required

Request body

mode'off' | 'optional' | 'required' required

off: sign-in is refused. optional: tokens are verified when sent; client-asserted user ids still work. required: a request that names an identified (non-anonymous) user id must carry a valid access token for that user; anonymous ids still work.

Response

Success

object'project_auth' required
project_idstring required
mode'off' | 'optional' | 'required' required

off: sign-in is refused. optional: tokens are verified when sent; client-asserted user ids still work. required: a request that names an identified (non-anonymous) user id must carry a valid access token for that user; anonymous ids still work.

issuerstring nullable required

Superwall's own issuer for this project: the iss (and aud) of the access tokens Superwall signs. null when this environment has no issuer configured.

jwks_urlstring nullable required

Where Superwall publishes the keys that sign this project's access tokens, so a backend can verify them offline. null when issuer is.

Changes