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

OAuth 2.0 Device Authorization Grant #6

Merged
merged 2 commits into from
Oct 28, 2024
Merged

Conversation

vamsii777
Copy link
Contributor

Adds the Device Code Grant flow, allowing clients to obtain access tokens through a user-friendly, device-based authorization process. This grants authorization without requiring a web browser interaction.

The flow involves:

  • Generating a device code and a user code for the user to input.
  • Verifying the code on a device.
  • Exchanging the device code for an access token once the user authorizes the application.

This enhancement provides a robust and secure alternative for scenarios where web browser-based OAuth flows are unsuitable.

Adds the Device Code Grant flow, allowing clients to obtain access tokens through a user-friendly, device-based authorization process. This grants authorization without requiring a web browser interaction.

The flow involves:
- Generating a device code and a user code for the user to input.
- Verifying the code on a device.
- Exchanging the device code for an access token once the user authorizes the application.

This enhancement provides a robust and secure alternative for scenarios where web browser-based OAuth flows are unsuitable.
@vamsii777 vamsii777 linked an issue Oct 28, 2024 that may be closed by this pull request
@vamsii777 vamsii777 changed the title Add device code flow grant OAuth 2.0 Device Authorization Grant Oct 28, 2024
The `deviceCode` status is now set to `.declined` instead of `.unauthorized` when a device code is created. This change better reflects the state of the device code, as it is not yet authorized but rather declined.
@vamsii777 vamsii777 merged commit 27e1d00 into swift-6 Oct 28, 2024
2 checks passed
@vamsii777 vamsii777 deleted the feat/device-code-flow branch October 28, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Device Code Grant flow
1 participant