feat: add the foundation for OAuth2 with Laravel Passport#4164
feat: add the foundation for OAuth2 with Laravel Passport#4164wescopeland merged 29 commits intoRetroAchievements:masterfrom
Conversation
found this while browsing through the site logged in as `Administrator` after seeding, unrelated but thought I'd flag
|
I collaborated heavily on this PR. How to test this PR sail artisan migrate
sail artisan passport:keys # this is already done on stage and prodThere are two authorization flows you can test-drive. The first is a standard client authorization flow where some app wants to log in on behalf of a user: You'll receive a Client ID and Client Secret.
In the real world, clicking Authorize and Reject will direct back to the consumer app. In our demo, we have an The other supported authorization flow is the device flow: In the response, you'll see an 8-character
Here, you can enter the 8-character code. Upon doing that, you'll see an Approve and Reject button again. Click either, and you'll see a confirmation. In the real-world, the user's app is going to be polling for the approve/reject status.
|
Jamiras
left a comment
There was a problem hiding this comment.
As long as the user is logged in, things seem to work appropriately. Left a couple comments regarding the flow when not logged in, and a general question on what the next steps would look like.
There was a problem hiding this comment.
Entering the correct credentials opens the form in a popup window where the code has to be entered again.
There was a problem hiding this comment.
Check in latest if you're still seeing this - I wasn't while authenticated.
There was a problem hiding this comment.
I'm not. And if it wasn't clear - this was hitting the page in an incognito mode, which would require logging in after entering the code. Then it would prompt to enter the code again after logging in. Putting the login before the code addresses the issue.
There was a problem hiding this comment.
Appears to be fixed.
Similar to other comment: "Entering the correct credentials" implies doing this while not authenticated.
There was a problem hiding this comment.
I'm not. And if it wasn't clear - this was hitting the page in an incognito mode, which would require logging in after entering the code. Then it would prompt to enter the code again after logging in. Putting the login before the code addresses the issue.
There was a problem hiding this comment.
Appears to be fixed.
Similar to other comment: "Entering the correct credentials" implies doing this while not authenticated.




How to test this PR
Adds OAuth2 authentication using Laravel Passport!
Current state of things:
php artisan passport:clientandphp artisan passport:client --devicefor testing.edited by @wescopeland to update the current state of things and directly link to my comment