-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The device flow input doesn't work, it just redirects to the stage configuration flow and then to the homepage of the Authentik instance.
To Reproduce
Steps to reproduce the behavior:
- Prepare
export CLIENT_ID="***" export BASE_URL="https://***"
- Trigger the device flow endpoint:
INIT_RES=$(curl -s -X POST --data-urlencode "client_id=$CLIENT_ID" --data-urlencode "scopes=openid email" $BASE_URL/application/o/device/) echo $INIT_RES | jq '{uri: .verification_uri, code: .user_code}' export DEVICE_CODE=$(echo $INIT_RES | jq -r .device_code)
- Go to the URI in that JSON response and enter the code
- Get redirected to the home of the instance
- Try to redeem the device code
curl -X POST --data-urlencode 'grant_type=urn:ietf:params:oauth:grant-type:device_code' --data-urlencode "client_id=$CLIENT_ID" --data-urlencode "device_code=$DEVICE_CODE" $BASE_URL/application/o/token/ | jq {expires_in: .expires_in}
- Receive
{"error": "authorization_pending", "error_description": "The authorization request is still pending as the end user hasn't yet completed the user-interaction steps"} - Run this and click on the link
echo $INIT_RES | jq '.verification_uri_complete'
- Run the redeem snippet again
curl -X POST --data-urlencode 'grant_type=urn:ietf:params:oauth:grant-type:device_code' --data-urlencode "client_id=$CLIENT_ID" --data-urlencode "device_code=$DEVICE_CODE" $BASE_URL/application/o/token/ | jq '{expires_in: .expires_in}'
- It works.
Expected behavior
I expect the code input to actually work.
Screenshots
2024-03-09 23-40-00.webm
Logs
Output of docker-compose logs or kubectl logs respectively
Version and Deployment:
- authentik version: 2024.2.2
- Deployment: docker compose
Additional context
The flow works when adding ?code=<CODE> manually to the URL.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working