How to set Azure Authentication custom login return url?

前端 未结 2 997
孤城傲影
孤城傲影 2020-12-10 18:00

I followed this article https://azure.microsoft.com/en-us/blog/announcing-app-service-authentication-authorization/ to set up Azure authentication for my MVC app. First I tu

2条回答
  •  鱼传尺愫
    2020-12-10 18:44

    Thank you. This really helped. The below worked ok for me:

         return RedirectToAction(string.Format("login/{0}?post_login_redirect_url=/Home/LoginCallBack", provider), ".auth");
    

    provider can be one the strings: google, twitter, microsoftaccount,aad,facebook.

    Also each provider must be configured on your project at the Azure Portal.

    redirect url may be any uri on your project

提交回复
热议问题