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" checksum = "f2c99b7a5614b72a78f04aa2021e5370fc1aef2475fffeffc0c1266b99007062"
dependencies = [ dependencies = [
"actix-service", "actix-service",
"actix-session 0.9.0", "actix-session",
"actix-utils", "actix-utils",
"actix-web", "actix-web",
"derive_more", "derive_more",
@ -205,22 +205,6 @@ dependencies = [
"tracing", "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]] [[package]]
name = "actix-tls" name = "actix-tls"
version = "3.4.0" version = "3.4.0"
@ -619,7 +603,7 @@ dependencies = [
"actix-cors", "actix-cors",
"actix-identity", "actix-identity",
"actix-remote-ip", "actix-remote-ip",
"actix-session 0.10.0", "actix-session",
"actix-web", "actix-web",
"anyhow", "anyhow",
"asn1", "asn1",

View File

@ -23,7 +23,7 @@ serde_json = "1.0.123"
rand = "0.8.5" rand = "0.8.5"
actix = "0.13.5" actix = "0.13.5"
actix-identity = "0.7.1" 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-cors = "0.7.0"
actix-remote-ip = "0.1.0" actix-remote-ip = "0.1.0"
futures-util = "0.3.30" futures-util = "0.3.30"

View File

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