diff --git a/api/src/core/sso/sso-remove.ts b/api/src/core/sso/sso-remove.ts index c3e73323e..390f03426 100644 --- a/api/src/core/sso/sso-remove.ts +++ b/api/src/core/sso/sso-remove.ts @@ -4,13 +4,12 @@ export const removeSso = () => { const path = '/usr/local/emhttp/plugins/dynamix/include/.login.php'; const backupPath = path + '.bak'; - // Remove the SSO login inject file if it exists - if (existsSync(path)) { - unlinkSync(path); - } - // Move the backup file to the original location if (existsSync(backupPath)) { + // Remove the SSO login inject file if it exists + if (existsSync(path)) { + unlinkSync(path); + } renameSync(backupPath, path); }