Skip to main content

Authorization Code Flow with PKCE (User Authorization)

The Authorization Code Flow with PKCE (Proof Key for Code Exchange) is recommended for mobile and public clients, as it provides an additional security layer to prevent authorization code interception attacks.

πŸ“€ Step 1: Authorization Request

The client redirects the user to the following URL to start the authorization process: Example URL (decoded for readability):
ℹ️ This URL is typically constructed and handled by your mobile app or frontend SDK.

πŸ” Parameters Explained


πŸ” PKCE Flow Summary

  1. Generate a Code Verifier
    A high-entropy random string (e.g., 43–128 chars).
  2. Generate a Code Challenge
    code_challenge = BASE64URL(SHA256(code_verifier))
  3. Redirect User to Login URL
    Include code_challenge and code_challenge_method=S256.
  4. User Logs In
    Upon success, they’re redirected to your redirect_uri with a code.
  5. Exchange Code for Token

Step 2: Token Exchange (with Basic Auth)

Once you receive the code at your redirect_uri, make the following request to get the access token: POST https://logintest.clearline.me/connect/token

πŸ”Έ Headers

Example:
Authorization: Basic Y2xvdmVyLWNtYy1tb2JpbGU6Y2xpZW50U2VjcmV0IQ==

πŸ”Έ Body


βœ… Example Response