Skip to main content
Mysoleas Identity Cloud is the identity service of the Mysoleas ecosystem. You can integrate it into your website, mobile application, or SaaS to manage authentication and user management without rebuilding that whole layer yourself. In practice, your application can use Mysoleas Identity Cloud to:
  • display the Sign in with Mysoleas button;
  • authenticate a user with OAuth2/OIDC;
  • retrieve a JWT and user claims;
  • read the user profile with userinfo;
  • delegate session and identity management to Mysoleas;
  • focus on your application’s own business logic.
You do not need to call the gateway to use Identity Cloud. The gateway becomes useful only if your application then consumes Mysoleas business services, such as SoleasPay. The public authentication service is:
The public gateway is optional in an identity-only journey:

Create an OAuth2 application

Before you use OAuth2, create an application in the Mysoleas dashboard.
  1. Create or use a Mysoleas account.
  2. Sign in to the dashboard:
  1. Open the OAuth2 applications section.
  2. Create a new application.
  3. Configure your allowed redirect URLs.
  4. Copy the client_id and, if your application type allows it, the client_secret.
  5. Enable the scopes required by your integration.
For a user-facing web or mobile application, prefer authorization_code with PKCE. Never place a client_secret in a frontend application.

SoleasPay application fee configuration

A SoleasPay payment/API application can define feeBearer to indicate who pays the fees for direct API payments initiated with its credentials. This configuration does not concern the OAuth2 client used only for Sign in with Mysoleas. It concerns applications that later call payment business services. This configuration is read from the authenticated application. Do not send an arbitrary applicationId in a payment to try to change who pays the fees.

Three different uses

If you call the Mysoleas gateway, protected routes do not expect the token in Authorization. Send the Bearer JWT in x-sp-auth-token.

Choose the right flow

Integrate Sign in with Mysoleas

The recommended flow for a third-party application is authorization_code with PKCE. Your button must redirect the user to the Mysoleas authorization endpoint with your application’s OAuth2 parameters.
Common parameters:

Use Identity Cloud without the gateway

If your application only wants to delegate authentication to Mysoleas, the flow stops after JWT validation and the userinfo call. Your backend can then:
  • create or find the local user matching the sub claim;
  • attach the user to an organization, workspace, or tenant in your application;
  • open an application session;
  • apply your own roles and permissions;
  • continue using your own business APIs without going through api.mysoleas.com.
In this mode, Mysoleas Identity Cloud replaces the identity building block of your application. It does not force you to use the gateway.

Request a token

After the OAuth2 callback, your backend exchanges the code for a token. For a server-to-server integration, use the client_credentials grant directly.
The response follows the OAuth format.

Call the API

If your application then consumes Mysoleas business services, all protected gateway routes expect the token in x-sp-auth-token.

Use context headers

These headers are useful for multi-country integrations, separated environments, and debugging.

OAuth discovery

You can read OAuth and OIDC metadata.
This route returns the official token, introspection, revocation, JWKS, and userinfo endpoints.

Best practices

  • Never put client_secret in the browser.
  • Renew the token before it expires.
  • Store tokens in memory or in a vault suited to your backend.
  • Use a stable idempotency key for every operation that can be replayed after a timeout.
  • Log transaction_reference, invoice_reference, and X-Request-Id together.