diff --git a/data/web/inc/triggers.inc.php b/data/web/inc/triggers.inc.php index 34e47a544..360f57277 100644 --- a/data/web/inc/triggers.inc.php +++ b/data/web/inc/triggers.inc.php @@ -111,8 +111,10 @@ if (isset($_POST["login_user"]) && isset($_POST["pass_user"])) { header("Location: /mobileconfig.php"); die(); } - header("Location: /user"); - die(); + if (!isset($_SESSION['oauth2_request'])) { + header("Location: /user"); + die(); + } } elseif ($as != "pending") { unset($_SESSION['pending_mailcow_cc_username']);