coreos / go-oidc

A Go OpenID Connect client.
Apache License 2.0
1.92k stars 393 forks source link

Support device auth flow #395

Open telekid opened 9 months ago

telekid commented 9 months ago

This PR adds support for the oauth Device Authorization Flow to go-oidc.

The oauth2 package added Device Authorization Flow support in version 0.13.01. In order to use this flow, the DeviceAuthURL endpoint must be set on the ProviderConfig. This value is made available during dynamic endpoint discovery via the device_authorization_endpoint json key. (See https://www.rfc-editor.org/rfc/rfc8628#section-4).

Tested locally against Auth0.