summaryrefslogtreecommitdiff
path: root/auth/callback
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-03-12 19:16:53 +0100
committerRaindropsSys <contact@minteck.org>2023-03-12 19:16:53 +0100
commiteb89b15c0f044673c1206a418a21d0baba1a675e (patch)
tree39ac31a576d8b8392cbd9baf8d67621bf2cefa86 /auth/callback
parent5385f0ed8fbb4325203a222a75e6700ffb519349 (diff)
downloadpluralconnect-eb89b15c0f044673c1206a418a21d0baba1a675e.tar.gz
pluralconnect-eb89b15c0f044673c1206a418a21d0baba1a675e.tar.bz2
pluralconnect-eb89b15c0f044673c1206a418a21d0baba1a675e.zip
Updated 104 files, added 3 files, deleted 4 files and renamed 36 files (automated)
Diffstat (limited to 'auth/callback')
-rw-r--r--auth/callback/index.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/auth/callback/index.php b/auth/callback/index.php
index 8419364..8d040e9 100644
--- a/auth/callback/index.php
+++ b/auth/callback/index.php
@@ -56,6 +56,12 @@ if (isset($result["access_token"])) {
header("Set-Cookie: PEH2_SESSION_TOKEN=" . $token . "; SameSite=None; Path=/; Secure; HttpOnly; Expires=" . date("r", time() + (86400 * 730)));
- header("Location: /");
+ if (isset($_COOKIE["PEH2_RETURN_PAGE"])) {
+ header("Location: " . str_replace("\n", "", str_replace("\r", "", $_COOKIE["PEH2_RETURN_PAGE"])));
+ } else {
+ header("Location: /");
+ }
+
+ setcookie("PEH2_RETURN_PAGE", "");
die();
} \ No newline at end of file