docs
  1. Resources
  2. Authenticate (oauth)
  3. Logout User With Redirect

Logout User with Redirect

1.0.0
OpenAPI 3.0.1

This is the specification of Authentication API. For more information about how to interact with the Authentication API, you can read the respective developer guide.

Getting Started

This API must be only used by backend services

Creating an API Client

First you will need to create a new API client using the SCAYLE Panel to obtain your client_id and client_secret. Make sure to store those credentials safely in your backend.

Authenticating a User

There are three different options on how to authenticate a user:

  1. Register a new user
  2. Login an existing user
  3. Login as a guest customer without a password

All of those endpoints will require you to provide the client_id and client_secret as a Basic Auth header.

Credentials client_id and client_secret don't have any expiration date. After successfully authenticating a user, you will get an access token and a refresh token. Access tokens are valid for 30 days and Refresh Tokens are valid for 60 days.

Validating a token

You will need to call the validation endpoint to check if an access token is still valid.

Refreshing a token

Refreshing a token is done by using the POST token endpoint by using the refresh_token OAuth grant.

You should consider to check the expiration date of the JWT to trigger a refresh early enough.

Server:https://{tenant-space}.auth.scayle.cloud
Client Libraries

Redirect Chains

​

Public GET endpoints for redirect chains

Redirect Chains Operations

Logout User with Redirect

​

This endpoint serves as an alternative to the standard auth/logout endpoint, allowing users to log out from the shop while also being redirected to a specified URL. A common use case is manually triggering token revocation on the Identity Provider (IDP) side. From the user’s perspective, logging out from the shop triggers the logout endpoint, which revokes tokens on the SCAYLE side. Then, the redirect URL within the JWT is called, directing the user to, for example, the IDP’s logout interface.

Authentication required: The caller must supply the user’s Bearer access token in the Authorization: Bearer <token> header. This allows the service to identify and revoke the session, including in stateless mode where access tokens are not persisted in the database.

Query Parameters

  • The shop ID.

  • The JWT containing the callbackUrl and tokenId. This JWT needs to be signed with the shopSecret.

Responses

  • Successful redirect to IDP in Location header

  • JWT invalid

  • Missing or invalid Bearer token

  • Validation failed

Request Example for get/v1/auth/logout/redirect
curl 'https://TENANT_SPACE.auth.scayle.cloud/v1/auth/logout/redirect?shopId=105&jwt=jwt%20payload%3A%20%7B%22callbackUrl%22%3A%22...%22%2C%22tokenId%22%3A%22...%22%2C%22iat%22%3A%20...%2C%22exp%22%3A%20...%7D' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
No Body

Last updated: November 27, 2026