Fix authentication issue

This commit is contained in:
Pierre HUBERT 2024-08-31 18:52:29 +02:00
parent 2022e99274
commit 871d5109bf
3 changed files with 4 additions and 20 deletions

View File

@ -106,7 +106,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2c99b7a5614b72a78f04aa2021e5370fc1aef2475fffeffc0c1266b99007062"
dependencies = [
"actix-service",
"actix-session 0.9.0",
"actix-session",
"actix-utils",
"actix-web",
"derive_more",
@ -205,22 +205,6 @@ dependencies = [
"tracing",
]
[[package]]
name = "actix-session"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac013ca53d36acb0cc60f5437381c97c291f51a12a5bd8d02febc3a3aaf53390"
dependencies = [
"actix-service",
"actix-utils",
"actix-web",
"anyhow",
"derive_more",
"serde",
"serde_json",
"tracing",
]
[[package]]
name = "actix-tls"
version = "3.4.0"
@ -619,7 +603,7 @@ dependencies = [
"actix-cors",
"actix-identity",
"actix-remote-ip",
"actix-session 0.10.0",
"actix-session",
"actix-web",
"anyhow",
"asn1",

View File

@ -23,7 +23,7 @@ serde_json = "1.0.123"
rand = "0.8.5"
actix = "0.13.5"
actix-identity = "0.7.1"
actix-session = { version = "0.10.0", features = ["cookie-session"] }
actix-session = { version = "0.9.0", features = ["cookie-session"] }
actix-cors = "0.7.0"
actix-remote-ip = "0.1.0"
futures-util = "0.3.30"

View File

@ -163,7 +163,7 @@ export class APIClient {
// Handle expired tokens
if (status === 412) {
AuthApi.UnsetAuthenticated();
window.location.href = import.meta.env.VITE_APP_BASENAME;
window.location.href = "/";
}
if (!args.allowFail && (status < 200 || status > 299))