-
Notifications
You must be signed in to change notification settings - Fork 188
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
Implicit Flow does not work #105
Comments
I have investigated this problem. |
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
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
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
I'd probably argue that you shouldn't support implicit flow, as it's largely considered insecure and outdated: https://www.ietf.org/archive/id/draft-ietf-oauth-security-topics-24.html#name-implicit-grant |
Test sample application: https://gitlab.com/netsphere/rails-omniauth-oidc-rp-sample/
Ruby 3.0, Rails 6.1, OmniAuth 2.0
The Code Flow is OK. But the Implicit Flow does not seem to work.
I'll investigate the cause.
The text was updated successfully, but these errors were encountered: