In the OAuth2 device flow, the end user must provide a code to the ..../oauth2/device/user endpoint. If the user is not authenticated, AM throws an internal server error 500.
- Configure AM as AS or OIDC provider: Dashboard > Configure OAuth Provider > Configure OpenID Connect
- Register an OAuth2 client called oauthclient with scope mail
- Start the device code grant with the curl command:
- The response will look like:
- Make sure the browser does not hold an AM session (clear cookies)
- Go to http://am.example.com:18080/am/oauth2/device/user and insert the user code
If the user is already authenticated, it works and the consent page is displayed