Skip to main content
Mysoleas Identity Cloud is the user management service of the Mysoleas ecosystem. You can integrate it into your website, mobile application, or SaaS to manage authentication, user sessions, and profiles 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 user 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. Identity Cloud should not be presented as the main way to connect to the Mysoleas business ecosystem: it manages your users. If your application then consumes SoleasPay gateway endpoints, create an application in SoleasPay and use its client_id and client_secret to get the application token expected by x-sp-auth-token. 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.

Three different uses

If you call the Mysoleas gateway for SoleasPay endpoints, protected routes do not expect the Identity Cloud user JWT. Send the token obtained from the application created in SoleasPay 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 user token

After the OAuth2 callback, your backend exchanges the code for a user token.
The response follows the OAuth format.

Call the SoleasPay gateway

If your application consumes SoleasPay endpoints through the gateway, use the credentials of the application created in SoleasPay.
All protected gateway routes then expect this 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.