Skip to content

Commit

Permalink
Added slash-independence for isLoginApp()
Browse files Browse the repository at this point in the history
  • Loading branch information
ulikoehler committed Jul 6, 2019
1 parent ccda504 commit 2956799
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion common/token.factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,12 @@ function initTokenFactory () {
// For dev replace localhost always by ip
loginUri = this.config.loginMainUrl.replace('localhost', '127.0.0.1');
var pathname = window.location.pathname;
// Also match "/login/" to "login"
var filteredPathname = pathname.replace(/\//g, '');
var filteredLoginURI = loginUri.replace(/\//g, '');

return (origin === loginUri) || (pathname === loginUri);
return (origin === loginUri) ||
(filteredPathname = filteredLoginURI);
},

getLoginAppUrl: function (page, redirect, param) {
Expand Down

0 comments on commit 2956799

Please sign in to comment.