mirror of
https://github.com/rommapp/romm.git
synced 2026-12-02 10:08:40 +01:00
fixes from trunk
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
from datetime import datetime, timedelta
|
||||
from typing import Final
|
||||
|
||||
from config import ROMM_AUTH_PASSWORD, ROMM_AUTH_SECRET_KEY, ROMM_AUTH_USERNAME
|
||||
from config import ROMM_AUTH_SECRET_KEY
|
||||
from exceptions.auth_exceptions import OAuthCredentialsException
|
||||
from fastapi import HTTPException, status
|
||||
from joserfc import jwt
|
||||
from joserfc.errors import BadSignatureError
|
||||
from joserfc.jwk import OctKey
|
||||
from logger.logger import log
|
||||
from passlib.context import CryptContext
|
||||
from sqlalchemy.exc import IntegrityError
|
||||
from starlette.requests import HTTPConnection
|
||||
|
||||
ALGORITHM: Final = "HS256"
|
||||
|
||||
@@ -25,11 +25,9 @@ from endpoints import (
|
||||
)
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from handler.auth import auth_handler
|
||||
from handler.auth.base_handler import ALGORITHM
|
||||
from handler.auth.hybrid_auth import HybridAuthBackend
|
||||
from handler.auth.middleware import CustomCSRFMiddleware, SessionMiddleware
|
||||
from handler.database import db_user_handler
|
||||
from handler.socket_handler import socket_handler
|
||||
from starlette.middleware.authentication import AuthenticationMiddleware
|
||||
from utils import get_version
|
||||
|
||||
@@ -39,7 +39,7 @@ api.interceptors.response.use(
|
||||
(error) => {
|
||||
if (error.response?.status === 403) {
|
||||
const allCookies = Cookies.get(); // Get all cookies
|
||||
for (let cookie in allCookies) {
|
||||
for (const cookie in allCookies) {
|
||||
Cookies.remove(cookie); // Remove each cookie
|
||||
}
|
||||
router.push({
|
||||
|
||||
Reference in New Issue
Block a user