Device Code Authorization Grant#29
Merged
Merged
Conversation
codefiesta
commented
May 29, 2025
| /// - Provider: the oauth provider | ||
| case authorizing(Provider) | ||
| /// - GrantType: the grant type | ||
| case authorizing(Provider, GrantType) |
Owner
Author
There was a problem hiding this comment.
GrantType is the breaking change in this PR. Downstream apps will need to update or stay at the 0.0.5 tag until they can update.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements the device code authorization grant workflow to allow tvOS (or any other apps that don't have access to a web browser) to leverage OAuthKit.
The Device Code Authorization Grant Workflow consists of the following:
1. Request Device Code:
deviceCodeURLwith theclientIDand desiredscopes.2. User Authorization:
3. App Polling for Authorization:
accessTokenURLendpoint in the background.This polling continues until the user completes the authorization, or the device and user codes expire.
client_idanddevice_codeobtained in step 1 are used in these polling requests.urn:ietf:params:oauth:grant-type:device_code.See:
Fixes #4
Type of change
Checklist: