5.5. Automatic Re-Login

This flow only applies to users who have been previously authorized using the same application and the same device they are using in their latest session. Additionally, the user must have previously selected the ‘Keep Me Logged In’ option and the application must have the accessToken in local storage.

Automatic Re-Login Flow

The automatic re-login flow consists of the below stages.

  1. The user launches cTrader.

  2. The application finds the stored accessToken.

  3. The application opens a new connection with the cTrader backend and sends an authorization request including the accessToken as a parameter.

  4. The cTrader backend sends a POST request to authorize the user via the provided accessToken (API call 4.3.).

  5. The broker’s CRM system checks the provided accessToken and responds with the relevant userId (API call 4.3.).

  6. The cTrader backend authorizes the current session under the provided userId.

  7. The application starts authorized communications with the cTrader backend.


Last update: September 26, 2022

Comments