Skip to content

Commit f0b41c9

Browse files
committed
Prefer VerificationURIComplete if present
In the OIDC Device Authorization Flow in command/oauth, present the user with VerificationURIComplete rather than VerificationURI if present, so that the user doesn't have to manually type the code when using an IdP that provides this feature. Fixes smallstep#1424
1 parent 7e33b4e commit f0b41c9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

command/oauth/cmd.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,9 @@ func (o *oauth) DoDeviceAuthorization() (*token, error) {
892892
}
893893

894894
switch {
895+
case idr.VerificationURIComplete != "":
896+
// Prefer VerificationURIComplete if present for user convenience
897+
idr.VerificationURI = idr.VerificationURIComplete
895898
case idr.VerificationURI != "":
896899
// do nothing
897900
case idr.VerificationURL != "":

0 commit comments

Comments
 (0)