- 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.
client_id and client_secret to get the application token expected by x-sp-auth-token.
The public authentication service is:
Create an OAuth2 application
Before you use OAuth2, create an application in the Mysoleas dashboard.- Create or use a Mysoleas account.
- Sign in to the dashboard:
- Open the OAuth2 applications section.
- Create a new application.
- Configure your allowed redirect URLs.
- Copy the
client_idand, if your application type allows it, theclient_secret. - Enable the scopes required by your integration.
Three different uses
Choose the right flow
Integrate Sign in with Mysoleas
The recommended flow for a third-party application isauthorization_code with PKCE.
Your button must redirect the user to the Mysoleas authorization endpoint with your application’s OAuth2 parameters.
Use Identity Cloud without the gateway
If your application only wants to delegate authentication to Mysoleas, the flow stops after JWT validation and theuserinfo call.
Your backend can then:
- create or find the local user matching the
subclaim; - 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.
Request a user token
After the OAuth2 callback, your backend exchanges thecode for a user token.
Call the SoleasPay gateway
If your application consumes SoleasPay endpoints through the gateway, use the credentials of the application created in SoleasPay.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.Best practices
- Never put
client_secretin 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, andX-Request-Idtogether.
