mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Revert autologin, because it broke OIDC login with Keycloak.
Thanks to wb9688 and xet7 ! Fixes #4660, related https://github.com/wekan/wekan/pull/4588
This commit is contained in:
parent
fbe1f5f948
commit
43a7096753
5 changed files with 34 additions and 93 deletions
|
@ -5,16 +5,6 @@ const emailField = AccountsTemplates.removeField('email');
|
|||
let disableRegistration = false;
|
||||
let disableForgotPassword = false;
|
||||
let passwordLoginDisabled = false;
|
||||
let oidcRedirectionEnabled = false;
|
||||
let oauthServerUrl = "home";
|
||||
let oauthDashboardUrl = "";
|
||||
|
||||
Meteor.call('isOidcRedirectionEnabled', (_, result) => {
|
||||
if(result)
|
||||
{
|
||||
oidcRedirectionEnabled = true;
|
||||
}
|
||||
});
|
||||
|
||||
Meteor.call('isPasswordLoginDisabled', (_, result) => {
|
||||
if (result) {
|
||||
|
@ -24,18 +14,6 @@ Meteor.call('isPasswordLoginDisabled', (_, result) => {
|
|||
}
|
||||
});
|
||||
|
||||
Meteor.call('getOauthServerUrl', (_, result) => {
|
||||
if (result) {
|
||||
oauthServerUrl = result;
|
||||
}
|
||||
});
|
||||
|
||||
Meteor.call('getOauthDashboardUrl', (_, result) => {
|
||||
if (result) {
|
||||
oauthDashboardUrl = result;
|
||||
}
|
||||
});
|
||||
|
||||
Meteor.call('isDisableRegistration', (_, result) => {
|
||||
if (result) {
|
||||
disableRegistration = true;
|
||||
|
@ -81,19 +59,11 @@ AccountsTemplates.configure({
|
|||
showForgotPasswordLink: !disableForgotPassword,
|
||||
forbidClientAccountCreation: disableRegistration,
|
||||
onLogoutHook() {
|
||||
// here comeslogic for redirect
|
||||
if(oidcRedirectionEnabled)
|
||||
{
|
||||
window.location = oauthServerUrl + oauthDashboardUrl;
|
||||
}
|
||||
else
|
||||
{
|
||||
const homePage = 'home';
|
||||
if (FlowRouter.getRouteName() === homePage) {
|
||||
FlowRouter.reload();
|
||||
} else {
|
||||
FlowRouter.go(homePage);
|
||||
}
|
||||
const homePage = 'home';
|
||||
if (FlowRouter.getRouteName() === homePage) {
|
||||
FlowRouter.reload();
|
||||
} else {
|
||||
FlowRouter.go(homePage);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue