Identity server 3 MVC client state parameter

十年热恋 提交于 2019-12-12 06:47:39

问题


I have asp.net MVC / angular application which connects through Identity Server 3.

What I want to achieve is for the IS3 to redirect me to the Angular path after login.

I already get the angular relative path before redirecting to IS3, what I need to do is to send that path to IS3 and have it send it back to me after login so that I can attach it to the redirect Uri.

I've tried adding it to the "state" parameter when redirecting to IS3, but that results in an invalid redirect. That parameter already has a value and if I change it, the redirect breaks

Is there any way for me to send that info to is3 and then get it back after login ?

Thanks


回答1:


The best way to achieve this is to store state in your app about the redirect path you want after login. After IdSvr logs your user in and redirect back to your one well-known callback URI you then read that state to know where to send the user. IOW, keep track of that in your app.

By restricting your callback into your app to a single well-known URL we're trying to prevent open redirect attacks.



来源:https://stackoverflow.com/questions/36953762/identity-server-3-mvc-client-state-parameter

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