I'm working on an application using Framework 4.6.2 and angularjs, We are using adal.js and adal-angular.js. The problem we are experiencing is that when you are logout of the application and click on a hyperlink that point to the aplication (not the root of the app) after login on xxxx.onmicrosoft.com it redirect you to the root.
For example you click on a link or put the following url in the browser
http://localhost:4434/#/ticket/search
The application takes you to the login page:
After that it redirect me to the root
instead of http://localhost:4434/#/ticket/search
Here is the code I have in place:
adalAuthenticationServiceProvider.init({
tenant: 'xxxxx.onmicrosoft.com',
clientId: 'xxxx-xxxx-xxxx-xxxxx',
cacheLocation: 'localStorage',
popUp: true
}, $httpProvider);
.when("/tickets/search", { controller: "TicketsSearchController", templateUrl: "app/tickets/templates/search.html", allowNavBack: true, requireADLogin: true }) we are using AdalJS and ADAL-angular v1.0.14
Microsoft.IdentityModel.Clients.ActiveDirectory 3.13.9
This is how the Startup class looks like
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.UseWindowsAzureActiveDirectoryBearerAuthentication(
new WindowsAzureActiveDirectoryBearerAuthenticationOptions
{
Tenant = "xxxxxx.onmicrosoft.com",
TokenValidationParameters = new TokenValidationParameters
{
ValidAudience = "xxxxxx.onmicrosoft.com/"
}
});
app.UseAeActiveDirectoryViaAzureAuthentication(WebConfigurationManager.AppSettings["ida:ClientId"],
WebConfigurationManager.AppSettings["ida:RedirectUri"]);
app.MapSignalR();
}
}
The issue is that no matter what url you are trying to go, it always redirects you to the url I specified on Azure which is the same I use in web.config
But the expected result is that if you navigate to a url like http://localhost:4434/#/ticket/search after you login you should be redirected to that Url not to the root http://localhost:4434
Thanks in advance for any help you can provide
Jose