-
Notifications
You must be signed in to change notification settings - Fork 597
Unable to process openid connect response as fragment #1195
Comments
fragments aren't sent to the server by the browser, so of course the middleware can't see the values. the use of fragment response mode in OIDC is most common with SPA/JavaScript-based clients, not server-side ones. |
Hi Brock, but what's the point of allowing to set ResponseMode to fragment if there is no way the middleware can intercept it? and the same goes for the option RequireStateValidation, if those options are not possible then they should not be there in the first place, should they? |
You could use query or form_post for server-side code, although the spec prohibits using query with id_tokens, so it's unclear why they added this to the middleware for OIDC. |
Since I'm the guy who's added it, I can answer that: to support the good old code flow with servers that don't implement the form post extension 😅 |
Oh yes, good point -- I had forgotten about code only flow. |
For the reasons described above, closing this. |
Hello!
I'm developing a web endpoint protected by a legacy openid connect server,
the configuration on the client website (startup.cs) is the following:
I'm obliged to set response_type as "token id_token" only.
After requesting an edpoint protected with the [Authorize] attribute, I correctly get redirected to the authorization server which provides a form for the user to login.
Once the user logs in, the authorization server returns a 302 to the client website appending a fragment with the access token and the id token.
Example:
I get an error from the openidconnect middleware (web client) saying:
The error is clear, it cannot find the state parameter, indeed, because it is not in the querystring anymore but on the fragment. However I explicitly set it to expect the response in the fragment. And even if this is not working, I also set an option to skip the state validation, but it doesn't work either.
I'm I missing something?
The text was updated successfully, but these errors were encountered: