Logout error when using Easy Auth v2 #1222
Unanswered
jwevansgam
asked this question in
Q&A
Replies: 1 comment 1 reply
-
@jwevansgam. Yes please, report a bug. (you can use ... reference in new issue to avoid you retying everything) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just want to put this out there but not sure if it should be a bug report or not, let's see how this goes
I have created a very vanilla ASP.NET Core MVC project using the Visual Studio 2019 project template, added a dependency to the Microsoft.Identity.Web (UI) projects (using v1.10), added the authentication code in startup, published to Azure App Service and enabled App Service Authentication v2 (Easy Auth). The default project has a _LoginPartial.cshtml file under views which points to the asp.area which is in the Microsoft.Identity.Web.UI project. This all works ok but I get an error when using the SignOut button. The error is
Value cannot be null or empty: (Parameter: 'localUrl')
The problem is this line of code
return LocalRedirect(AppServicesAuthenticationInformation.LogoutUrl);
https://github.com/AzureAD/microsoft-identity-web/blob/master/src/Microsoft.Identity.Web.UI/Areas/MicrosoftIdentity/Controllers/AccountController.cs#L117
This resolves down to accessing the environment variable WEBSITE_AUTH_LOGOUT_PATH
The problem is App Service Authentication v2 (recently released) doesn't set this environment variable anymore, it is deprecated. See the below link.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/17661111-c2d9-41ac-ab5b-df1cf7190585/websiteauthlogoutpath-since-novemeber-2015?forum=windowsazurewebsitespreview
Do you guys know about this issue? should I report as a bug?
Beta Was this translation helpful? Give feedback.
All reactions