Documentation

OAuth 2.0 integration guide

Alf Mille combines verified identity (KYC) with Laravel Passport–powered OAuth 2.0. Use this guide to understand flows, endpoints, and safe integration patterns for your applications.

Authorization Code Grant

The Authorization Code Grant is the recommended flow for server-side applications. It involves two steps:

OAuth 2.0 Flow Explanation

  1. User is redirected to the authorization server
  2. User authorizes the application
  3. Authorization server redirects back with an authorization code
  4. Application exchanges the code for an access token
  5. Application uses the access token to access protected resources

1. Request Authorization

GET Request
GET https://www.alfrae.com/oauth/authorize?
client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&response_type=code&scope=

2. Exchange Authorization Code for Token

POST Request
POST https://www.alfrae.com/oauth/token
Content-Type: application/json

{
  "grant_type": "authorization_code",
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "redirect_uri": "YOUR_REDIRECT_URI",
  "code": "AUTHORIZATION_CODE"
}