Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Device Grant to be completed out of band #2218

Closed
5 tasks done
robotdan opened this issue Apr 17, 2023 · 1 comment
Closed
5 tasks done

Allow Device Grant to be completed out of band #2218

robotdan opened this issue Apr 17, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request openid-connect
Milestone

Comments

@robotdan
Copy link
Member

robotdan commented Apr 17, 2023

Allow Device Grant to be completed out of band

Description

There may be use cases where you need to bail out of our oauth login flow but want to complete a device grant flow later.

Solution

New APIs

  • POST /oauth2/device/complete - complete a device grant
    • Authorize: API key (optionally add a JWT to omit the post body)
    • userId=userId
  • POST /oauth2/device/introspect - Validate a user_code
    • parameters: user_code
    • result: ok, if an IdP link is present, return enough data to display to a user or complete a link manually

Workflow

Workflow A

  1. Start a device grant with an IdP link
  2. Enter code on a FusionAuth page and bail sometime before completing login which means no auth code was generated.
  3. Complete device code grant with a new API which will complete the IdP link associated with a user_code

Workflow B

  1. Start a device grant with an IdP link
  2. Enter code on a FusionAuth page and bail sometime before completing login which means no auth code was generated.
  3. Complete the IdP link using an API, this links the IdP to the user
  4. Complete device code grant, the link is already completed from the prior step, it should not error, and complete normally.

Workflow C

  1. Start a device grant with an IdP link
  2. Collect the code on your own page, not using a themed FusionAuth page
  3. Validate the user_code with the existing API /oauth2/device/validate, or call a new API /oauth2/device/introspect to validate and get information about the user_code such as if there is a device link associated with it, the type, id, name, and user display name from the pending link..
  4. Begin an Auth code grant with the collected user_code
  5. Complete Auth code grant, link is completed.

Related

Documentation

  • new /oauth2/device/user-code
  • new /oauth2/device/approve
  • updates to /oauth2/introspect
  • deviceInfo.device.type is no longer an enum
  • new /api/identity-provider/link/pending

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

@robotdan robotdan self-assigned this Apr 17, 2023
@robotdan robotdan added the enhancement New feature or request label Apr 17, 2023
@robotdan robotdan added this to Backlog in FusionAuth Issues via automation Apr 17, 2023
@robotdan robotdan added this to the 1.46.0 milestone Apr 17, 2023
@robotdan robotdan moved this from Backlog to In progress in FusionAuth Issues Apr 17, 2023
@robotdan robotdan moved this from In progress to Code complete in FusionAuth Issues May 29, 2023
@robotdan robotdan moved this from Code complete to In progress in FusionAuth Issues May 29, 2023
@robotdan robotdan moved this from In progress to Code complete in FusionAuth Issues May 29, 2023
FusionAuth Issues automation moved this from Code complete to Done Jun 14, 2023
@robotdan robotdan reopened this Jun 15, 2023
FusionAuth Issues automation moved this from Done to In progress Jun 15, 2023
@robotdan robotdan moved this from In progress to Reviewer approved in FusionAuth Issues Jun 19, 2023
@robotdan robotdan moved this from Reviewer approved to Done in FusionAuth Issues Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request openid-connect
Projects
FusionAuth Issues
  
Delivered
Development

No branches or pull requests

1 participant