CLI Auth for WorkOS Connect enables third-party applications to build command-line tools that integrate with your app’s credentials using the OAuth 2.0 Device Authorization Flow.
The CLI Auth flow for Connect involves two main endpoints:
Read more about CLI Auth here.
Exchanges a device code for access and refresh tokens as part of the device authorization flow for WorkOS Connect applications. This endpoint should be polled repeatedly until the user authorizes the request, declines it, or the device code expires.
curl -X POST 'https://<subdomain>.authkit.app/oauth2/token' \ -d 'grant_type=urn:ietf:params:oauth:grant-type:device_code' \ -d 'device_code=ETaHpDNhfxu0HyLhp6b8HGSh26NzYJSKw3TT6aS7HKKBhTyTD0zAW6ApTTolug0b' \ -d 'client_id=client_01JP8BD0CZ401TDF9X54NT5ZEK'
POST/oauth2 /tokenParameters Returns The returned tokens are similar to those provided by the authorization code grant.