Skip to content

Device Code Authorization does not work when entering user code manually #12014

@relvacode

Description

@relvacode

Describe the bug

When trying to obtain a token using the device code authorization flow I cannot enter the user code manually in the form given by verification_uri. After entering the correct code and pressing submit, an error is displayed.

If I go directly to the verification_uri_complete URL (i.e. with ?code=) then it does work.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new stage configuration flow. Set require authentication (I have also tried with no authentication)
  2. Change the brand's device code flow to this flow (I have also tried default-source-pre-authentication)
  3. Create an application with the OAuth provider. Set credentials type to public.
  4. Initiate a device code authorization flow through /application/o/device
  5. Navigate to the verification_uri given in the response and enter the user code
  6. Press Continue
  7. An error is displayed

Expected behavior

Entering the code in the form should work the same way going directly to verification_uri_complete does

Screenshots
If applicable, add screenshots to help explain your problem.

Screenshot 2024-11-13 at 12 26 46

Screenshot 2024-11-13 at 12 24 22

Logs

authentik-server.log

Version and Deployment (please complete the following information):

  • authentik version: 2024.10.1
  • Deployment: docker-compose

Additional context

If there is specific configuration I need for the device code flow then it isn't documented anywhere.

I have tried the above steps in a private browsing session to no effect.

I have not been able to find any logs anywhere to indicate the underlying trace for the error displayed.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingbug/confirmedConfirmed bugs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions