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

Support for OAuth Device Flow #903

Closed
lipkau opened this issue Dec 9, 2018 · 21 comments
Closed

Support for OAuth Device Flow #903

lipkau opened this issue Dec 9, 2018 · 21 comments

Comments

@lipkau
Copy link

lipkau commented Dec 9, 2018

Hi there.

I am working on a project in which I want to pair a piece of hardware to the user account.
I am a fan of how other project (youtube, apple tv, etc) do it - with OAuth Device Flow).
https://tools.ietf.org/html/draft-ietf-oauth-device-flow-13

Any chance Passport supports (or can support) this flow?
When testing the apis with this instrucction, I get

{
    "error": "unsupported_grant_type",
    "message": "The authorization grant type is not supported by the authorization server.",
    "hint": "Check that all required parameters have been provided"
}
@Sephster
Copy link
Contributor

Sephster commented Dec 9, 2018

It's not supported at present. There is an old request to add this to OAuth2-Server though. I will pick this up in a week's time and add it in. I've tagged it for the version 8 branch but hopefully it can be added to version 7 if there is no BC breaks.

I plan on adding a lot of features during the Christmas break time permitting.

@lipkau
Copy link
Author

lipkau commented Dec 9, 2018

awesome! thx

@driesvints
Copy link
Member

I'll mark this as an enhancement we might consider once OAuth2-Server has added support :)

@lchhieu
Copy link

lchhieu commented Dec 21, 2018

i get the same error. How to fix it

@lipkau
Copy link
Author

lipkau commented Jan 13, 2019

@Sephster : any news on this?

@Sephster
Copy link
Contributor

I started on this over Christmas and it is about 50% done. Need to pick it up again soon. No definite date on when this will be released though as my time has been stretched more than I thought.

The main issue I'm contending with at the moment is how to implement the view. I am leaning towards not implementing one and letting the implementers decide how this is created. This will require good guidance in the docs and also updates to the examples so it is a bigger job than I initially anticipated.

@lipkau
Copy link
Author

lipkau commented Jan 14, 2019

no problem. was just curious.
Will you update / link this issue when you have updates? or should I subscribe to another issue?

@Sephster
Copy link
Contributor

This was the original PR in the league's repo thephpleague/oauth2-server#626. I will likely update this one as well though

@almas1992
Copy link

This was the original PR in the league's repo thephpleague/oauth2-server#626. I will likely update this one as well though

Has there been any progress on that front?

@mastacheata
Copy link

@Sephster
I think you have an off-by-one error in the first and last digit of the issue number. ;)

This issue is referring to the Out-of-bounds device flow / device grant used on stuff like TVs, STBs, Home Stereos and Car Infotainment devices etc that don't have a browser or a comfortable user input.
While that is implemented on many devices, it is not yet an internet standard, but still in the draft phase. (See: https://tools.ietf.org/html/draft-ietf-oauth-device-flow-15 for the current draft specification as of July 2019)

The issue you mentioned on the oauth2-server is about the dynamic registration stuff and has a separate issue on Passport in #804

@yovchev
Copy link

yovchev commented Feb 12, 2020

Hi @Sephster I have a working example with the laravel/passport that implements the device flow using this fork device-flow-grant that expands on the work that you already have done with @lucadegasperi you can see it here yovchev/passport

I have the full device flow cycle using post requests (all requests and responses including errors are as per rfc8628 spec)

image

And also I have implemented a widget for laravel passport for visual device code activation

image
image

I'm going to be setting up a pull request for laravel passport next few days so please let me know if I can do anything to speed up the pull request on thephpleague/oauth2-server

@driesvints can you suggest where to do the pull request on laravel against master?

Also will be great if some of you guys want to help push this out as I don't have much time on my hands and there is some cleaning and test's to be written.

@driesvints
Copy link
Member

Hey @yovchev. First of all: thanks for all your work on this 👍

I think it's best that we wait until oauth2-server has merged that open pr first and tagged a new release.

The pull request for passport will depend on wether your PR introduces any breaking changes. If there are it's probably best sent to master. If not it can be sent to the current stable release branch.

I don't have much time myself at this point to help out I'm afraid, sorry.

@darrencoutts118
Copy link

@yovchev - Have you submitted a PR to oauth2-server? I'm interested in seeing this making it into production

@martinbean
Copy link

Did this go anywhere? I’ll be embarking on a Roku app soon and will need to use this to authenticate users against my Laravel-based app.

@driesvints
Copy link
Member

The issue on OAuth Server 2 is still open so I don't think so, no. thephpleague/oauth2-server#626

@Sephster
Copy link
Contributor

Yeah the development is done but needs some testing. I am working on this but progress is slow

@driesvints
Copy link
Member

Thanks for your work @Sephster 👍

@driesvints
Copy link
Member

Gonna close this for now until it's landed in OAuth2 Server. Thanks.

@plunkettscott
Copy link

plunkettscott commented May 17, 2024

@driesvints can this be reopened now that OAuth Server 9.x has been released with the device grant included?

https://github.com/thephpleague/oauth2-server/releases/tag/9.0.0

@driesvints
Copy link
Member

Not re-opened but as said in #1734 we're now accepting PR's to 13.x for the device flow. I believe @hafezdivandari will work on this.

@hafezdivandari
Copy link
Contributor

I'll send a PR for this after #1744 is merged. The client model needed some refctoring after all these years, and adding more client grant types without polishing the current code isn't a good idea IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests