Repository navigation
Conversation
Add `OAuth::login_with_device_code()` to log in with the OAuth 2.0 device authorization grant (RFC 8628), for clients that cannot open a browser, such as bots, bridges and command-line applications. The spec sanctions this grant as one of the two login flows of the OAuth 2.0 API. The grant was already implemented for the QR code login, but kept private and gated on the `e2e-encryption` feature. The two helpers are now shared, `DeviceAuthorizationOAuthError` moved to the `error` module with a re-export at its old path, and the new `LoginWithDeviceCode` future exposes the verification URI and user code through a progress stream before waiting for the user's approval and loading the session like the other OAuth 2.0 logins. Signed-off-by: Moritz Stückler <moritz@bitbetter.de>
Keep only the essential steps in the rustdoc example of `OAuth::login_with_device_code()` and link to the `oauth_device_code` example crate for a complete program. Signed-off-by: Moritz Stückler <moritz@bitbetter.de>
Add the Nordeck copyright to the files created or significantly changed for the device code login, below the existing holders. Signed-off-by: Moritz Stückler <moritz@bitbetter.de>
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
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.
EDIT: Sorry, premature PR.