@digigov/auth
Advanced tools
Comparing version 0.0.1-auth-flow.4 to 0.0.1-auth-flow.5
@@ -68,12 +68,16 @@ import { useEffect, useMemo } from 'react'; | ||
window.localStorage.setItem('popup-login', '1'); | ||
externalWindow.document.title = title || 'Login'; | ||
externalWindow.addEventListener('beforeunload', function () { | ||
window.localStorage.removeItem('popup-login'); | ||
externalWindow.document.title = title || 'Login'; // this is a hack since we can't track a popup close event from different domain | ||
if (readSession().authenticated) { | ||
window.location.href = new URL(nextURL, document.baseURI).href; | ||
var checkWindowInterval = setInterval(function () { | ||
if (externalWindow === null) { | ||
clearInterval(checkWindowInterval); | ||
window.localStorage.removeItem('popup-login'); | ||
if (readSession().authenticated) { | ||
window.location.href = new URL(nextURL, document.baseURI).href; | ||
} | ||
} | ||
}); | ||
}, 500); | ||
} | ||
}, [loginUrl]); | ||
} |
@@ -68,12 +68,16 @@ import { useEffect, useMemo } from 'react'; | ||
window.localStorage.setItem('popup-login', '1'); | ||
externalWindow.document.title = title || 'Login'; | ||
externalWindow.addEventListener('beforeunload', function () { | ||
window.localStorage.removeItem('popup-login'); | ||
externalWindow.document.title = title || 'Login'; // this is a hack since we can't track a popup close event from different domain | ||
if (readSession().authenticated) { | ||
window.location.href = new URL(nextURL, document.baseURI).href; | ||
var checkWindowInterval = setInterval(function () { | ||
if (externalWindow === null) { | ||
clearInterval(checkWindowInterval); | ||
window.localStorage.removeItem('popup-login'); | ||
if (readSession().authenticated) { | ||
window.location.href = new URL(nextURL, document.baseURI).href; | ||
} | ||
} | ||
}); | ||
}, 500); | ||
} | ||
}, [loginUrl]); | ||
} |
@@ -1,2 +0,2 @@ | ||
/** @license Digigov v0.0.1-auth-flow.4+9170502 | ||
/** @license Digigov v0.0.1-auth-flow.5+c24db6f | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
16
hooks.js
@@ -92,12 +92,16 @@ "use strict"; | ||
window.localStorage.setItem('popup-login', '1'); | ||
externalWindow.document.title = title || 'Login'; | ||
externalWindow.addEventListener('beforeunload', function () { | ||
window.localStorage.removeItem('popup-login'); | ||
externalWindow.document.title = title || 'Login'; // this is a hack since we can't track a popup close event from different domain | ||
if ((0, _localSession.readSession)().authenticated) { | ||
window.location.href = new URL(nextURL, document.baseURI).href; | ||
var checkWindowInterval = setInterval(function () { | ||
if (externalWindow === null) { | ||
clearInterval(checkWindowInterval); | ||
window.localStorage.removeItem('popup-login'); | ||
if ((0, _localSession.readSession)().authenticated) { | ||
window.location.href = new URL(nextURL, document.baseURI).href; | ||
} | ||
} | ||
}); | ||
}, 500); | ||
} | ||
}, [loginUrl]); | ||
} |
@@ -1,2 +0,2 @@ | ||
/** @license Digigov v0.0.1-auth-flow.4+9170502 | ||
/** @license Digigov v0.0.1-auth-flow.5+c24db6f | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
{ | ||
"name": "@digigov/auth", | ||
"version": "0.0.1-auth-flow.4+9170502", | ||
"version": "0.0.1-auth-flow.5+c24db6f", | ||
"description": "@digigov authentication client", | ||
@@ -20,5 +20,5 @@ "author": "GRNET Developers <devs@lists.grnet.gr>", | ||
}, | ||
"gitHead": "9170502e0a3022a67be558e61b0e325306fe2ae1", | ||
"gitHead": "c24db6fcf235292ff74e7781ed589466ddb78339", | ||
"private": false, | ||
"typings": "./index.d.ts" | ||
} |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
84115
2504