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
- User is redirected to the authorization server
- User authorizes the application
- Authorization server redirects back with an authorization code
- Application exchanges the code for an access token
- 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" }