OAuth Provider Setup¶
Configure USSO as an OAuth/OIDC provider.
Enable OAuth¶
OAuth is enabled by default. Verify configuration:
Register Client Application¶
curl -X POST http://localhost:8000/api/sso/v1/oauth/clients \
-H "Authorization: Bearer TOKEN" \
-d '{
"name": "My Mobile App",
"redirect_uris": ["https://myapp.com/callback"],
"grant_types": ["authorization_code", "refresh_token"],
"scopes": ["openid", "profile", "email"]
}'
Save the client_id and client_secret returned.
Test Authorization Flow¶
-
Redirect user to authorization endpoint:
-
User approves
-
USSO redirects with code:
-
Exchange code for tokens: