Commit ecd060e0 authored by Marcel Nellesen's avatar Marcel Nellesen

Merge branch 'Topic/861-mergeAccounts' into 'Product/504-mergeWorkflow'

Update: Add Merge Token path

See merge request !29
parents a2cfcc4c b301d9b8
......@@ -44,6 +44,7 @@
:shibbolethReturnUrl="this.shibbolethReturnUrl"
:idpUrl="this.idpUrl"
:loggedInWithShibboleth="this.loggedInWithShibboleth"
:mergeReturnUrl="mergeReturnUrl"
@back="loginBack"
@clickGetLoginForm="getLoginForm"
@clickGetORCiDForm="getORCiDForm"
......@@ -117,6 +118,10 @@ function getReturnUrl(method: string) {
return returnUrl;
}
function getMergeReturnUrl() {
return getReturnUrl('Merge');
}
function getTOSReturnUrl() {
return encodeURI('' + getReturnUrlParam());
}
......@@ -188,6 +193,7 @@ export default Vue.extend({
returnUrl: getAccountReturnUrl(),
shibbolethReturnUrl: getShibbolethReturnUrl(),
tosReturnUrl: getTOSReturnUrl(),
mergeReturnUrl: getMergeReturnUrl(),
idpUrl: getIdpUrl(),
orcidUrl: getORCiDUrl(),
logoutState: getIsLogout(),
......
......@@ -32,11 +32,16 @@ export default Vue.extend({
};
},
mounted() {
if (document.cookie.indexOf('coscine.mergetoken') !== -1) {
window.location.href = this.mergeReturnUrl;
return;
}
this.getOrcidState();
},
props: {
idpUrl: String,
loggedInWithShibboleth: Boolean,
mergeReturnUrl: String,
},
methods: {
clickLogoutOrcid() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment