git-credential-oauth icon indicating copy to clipboard operation
git-credential-oauth copied to clipboard

Show QR code for device auth

Open hickford opened this issue 1 year ago • 1 comments

https://datatracker.ietf.org/doc/html/rfc8628#section-3.3.1

When "verification_uri_complete" is included in the authorization response, clients MAY present this URI in a non-textual manner using any method that results in the browser being opened with the URI, such as with QR (Quick Response) codes or NFC (Near Field Communication), to save the user from typing the URI.

For usability reasons, it is RECOMMENDED for clients to still display the textual verification URI ("verification_uri") for users who are not able to use such a shortcut. Clients MUST still display the "user_code", as the authorization server will require the user to confirm it to disambiguate devices or as remote phishing mitigation.

Requires qrencode to be installed

Assumes server populates verification_uri_complete -- GitLab does, GitHub does not.

hickford avatar Oct 13 '23 11:10 hickford

Example screenshot:

image

hickford avatar Oct 13 '23 13:10 hickford