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

Device Flow: verification_uri vs verification_url for Google. #666

Closed
nikolay-turpitko opened this issue Sep 12, 2023 · 5 comments
Closed

Comments

@nikolay-turpitko
Copy link
Contributor

I'm checking newly implemented Device Flow and I've found a minor issue.
Here:

type DeviceAuthResponse struct {
   VerificationURI string `json:"verification_uri"` 
}

Verefication URI is decoded from JSON field, named according RFC.

But here, Google uses verification_url name. Which is, obviously, contradicts spec, but it would be nice to be able to somehow obtain it anyway.

Would it be possible to add raw data field to DeviceAuthResponse, or map with all received fields, or map with additional (not parsed) fields from the response JSON?

@nikolay-turpitko
Copy link
Contributor Author

@hickford Could you please check?

@hickford
Copy link
Contributor

Google uses verification_url which contradicts spec RFC 8628 verification_uri

Have you reported this at developers.google.com?

@hickford
Copy link
Contributor

hickford commented Sep 12, 2023

Here's a two-line fix that avoids changing the API #667

@nikolay-turpitko
Copy link
Contributor Author

Have you reported this at developers.google.com?

No, I haven't, TBH. From my previous experience it never helps with big corporations.

Here's a two-line fix that avoids changing the API #667

This works perfectly!

@bcmills
Copy link
Contributor

bcmills commented Sep 22, 2023

This appears to be https://issuetracker.google.com/issues/151238144.

jbrichetto pushed a commit to openly-engineering/oauth2 that referenced this issue May 22, 2024
Some servers misspell verification_uri as verification_url, contrary to spec RFC 8628

Example server https://issuetracker.google.com/issues/151238144

Fixes golang#666

Change-Id: I89e354368bbb0a4e3b979bb547b4cb37bbe1cc02
GitHub-Last-Rev: bbf169b
GitHub-Pull-Request: golang#667
Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/527835
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Nikolay Turpitko <nick.turpitko@gmail.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Matt Hickford <matt.hickford@gmail.com>
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 a pull request may close this issue.

4 participants
@hickford @nikolay-turpitko @bcmills and others