Corregit error quan l'hora del servidor està lleugerament desincronitzada
Change-Id: I7a1b78824f770dcdfe548afa9b7c8b45b166c5b3
diff --git a/core.php b/core.php
index ae96f1c..c4f1af5 100644
--- a/core.php
+++ b/core.php
@@ -15,7 +15,7 @@
// Session settings
if(PHP_VERSION_ID < 70300) {
- session_set_cookie_params(0, ($conf['path'] ?? '/').'; samesite=None', $_SERVER['HTTP_HOST'], $conf['isProduction'], true);
+ session_set_cookie_params(0, ($conf['path'] ?? '/').'; SameSite=None', $_SERVER['HTTP_HOST'], $conf['isProduction'], true);
} else {
session_set_cookie_params([
'lifetime' => 0,
diff --git a/inc/Auth.php b/inc/Auth.php
index c0fc078..8027a36 100644
--- a/inc/Auth.php
+++ b/inc/Auth.php
@@ -13,6 +13,9 @@
$this->client->addScope('https://www.googleapis.com/auth/userinfo.email');
$this->client->setRedirectUri($conf['fullPath'].'oauth2callback.php');
$this->client->setAccessType('online');
+
+ // Sometimes the server is slightly out of sync with the OAuth2 server.
+ \Firebase\JWT\JWT::$leeway = 5;
}
public function getAuthUrl() {