docs
  1. Resources
  2. Single Sign-on (idp)
  3. Callback After Login

Callback after Login

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

Callback after Login

​

This endpoint is triggered by the Identity Provider (IDP) after successful user authentication and is intended for internal SCAYLE use only. It returns the authorization code, which is included in the Redirect response. This endpoint is primarily relevant for debugging purposes.

Query Parameters

  • The signed JWT state data which will be received back from the used provider.

  • The OAuth auth code to fetch the access token via the OAuth 2.0 protocol.

  • In case error occurs on IDP side, error is passed in this error parameter

  • In case error occurs on IDP side, better error description might be passed as a parameter

Responses

  • Successful redirect back to shop in Location header

  • Request invalid

  • Provider not found

  • Validation failed

Request Example for get/v1/auth/external/callback
curl 'https://TENANT_SPACE.auth.scayle.cloud/v1/auth/external/callback?state=jwt%20payload%3A%20%7B%22idpId%22%3A%20...%2C%20%22shopId%22%3A%20...%2C%20%22clientId%22%3A%20...%2C%20%22forwardJwt%22%3A%20%7B%22callbackUrl%22%3A%22...%22%2C%22idpKey%22%3A%22...%22%2C%22idpId%22%3A%20...%2C%22shopId%22%3A%20...%2C%22clientId%22%3A%22...%22%2C%22iat%22%3A%20...%2C%22exp%22%3A%20...%7D%7D&code=%3Ccode%3E&error=invalid_scope&error_description=The%2Brequested%2Bscope%2Bis%2Binvalid%2C%2Bunknown%2C%2Bor%2Bmalformed.%2BThe%2BOAuth%2B2.0%2BClient%2Bis%2Bnot%2Ballowed%2Bto%2Brequest%2Bscope'
No Body

Last updated: November 27, 2026