You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closes [omniauth#105][]
Similar to [omniauth#107][]
Some OpenID compatible IdP support hybrid authorizations that accept a
`response_type` with both `code` and `id_token`.
For example, [Microsoft Azure B2C][] accepts them as a URL-encoded
array:
> `response_type`: Must include an ID token for OpenID Connect. If your web application also needs tokens for calling a web API, you can use `code+id_token`.
This commit extends the `OmniAuth::Strategies::OpenIDConnect` to encode
the `response_type` into the query parameter as space-delimited token
list when provided as an array. Similarly, when checking for missing
keys in the response, iterate over the values as if they're an array.
For the originally supported single-value case, the previous behavior is
maintained.
[Microsoft Azure B2C]: https://learn.microsoft.com/en-us/azure/active-directory-b2c/openid-connect#send-authentication-requests
[omniauth#105]: omniauth#105
[omniauth#107]: omniauth#107
| discovery | Should OpenID discovery be used. This is recommended if the IDP provides a discovery endpoint. See client config for how to manually enter discovered values. | no | false | one of: true, false |
55
55
| client_auth_method | Which authentication method to use to authenticate your app with the authorization server | no | Sym: basic | "basic", "jwks" |
56
56
| scope | Which OpenID scopes to include (:openid is always required) | no | Array<sym> [:openid]|[:openid, :profile, :email]|
57
-
| response_type | Which OAuth2 response type to use with the authorization request | no | String: code | one of: 'code', 'id_token'|
57
+
| response_type | Which OAuth2 response type to use with the authorization request | no | String or Array: code |'code', 'id_token', or ['code', 'id_token']|
58
58
| state | A value to be used for the OAuth2 state parameter on the authorization request. Can be a proc that generates a string. | no | Random 16 character string | Proc.new { SecureRandom.hex(32) } |
59
59
| require_state | Should state param be verified - this is recommended, not required by the OIDC specification | no | true | false |
60
60
| response_mode | The response mode per [spec](https://openid.net/specs/oauth-v2-form-post-response-mode-1_0.html)| no | nil | one of: :query, :fragment, :form_post, :web_message|
0 commit comments