No signin id passed during redirect from Custom Middleware (External Identity Provider)

最后都变了- 提交于 2019-12-24 01:53:54

问题


We want an external identity provider within our identityserver where user is redirected to login to this external identity provider (Idp) and complete the authentication there. The external Idp redirects the response back to our identityserver where we want to form the user claims from the response and redirect back to the calling client.

We followed the answer to this stackoverflow question. We implemented our own owin middleware following the the Anders Abel Tutorial and owin middleware's for Google Auth as external Idp.

We also followed the exact implementation of CustomHrd Sample. Everything in the middleware works perfectly, the user gets redirected to the external Idp with the state, we get the response from there back (with the state), we form the claims and on completion we finish the owin middleware pipeline and redirect to /core/callback, but the Identityserver gives the following error:

The URL call flow is available below:

  1. /core/connect/authorize?params
  2. /core/login?signin=3a84a4f3dfe3218b06f3aa2185415e1e
  3. /core/ta (IDP Selector page)
  4. /core/login?signin=3a84a4f3dfe3218b06f3aa2185415e1e (Resume Uri after Idp Selection)
  5. /core/ta/tacall?state=
  6. Redirect to External URL with state
  7. Callback from External Identity provider with state: /core/ta/tacall?state=
  8. Redirect from middleware to redirectUri after forming claims - /core/callback
  9. Error occurs on /core/callback saying "There is an error determining which application you are signing into. Return to the application and try again."

Can you please help us figure out why would this occur?

Note: I also looked into the cookies, we are passing the cookie to /core/callback which contains the SignInMessage.

来源:https://stackoverflow.com/questions/46149131/no-signin-id-passed-during-redirect-from-custom-middleware-external-identity-pr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!