added cli parameter to toggle registraion, and split the monorepo: now this is only the backend

This commit is contained in:
2026-01-13 16:04:58 +01:00
parent 0e8ef49cfd
commit 86d86473af
11 changed files with 184 additions and 146 deletions

View File

@@ -50,7 +50,7 @@ pub fn create_jwt(user_uuid: Uuid) -> Result<String, String> {
};
let secret =
std::env::var("CHATAPP_JWT_SECRET").unwrap_or_else(|_| DEFAULT_SECRET_KEY.to_string());
std::env::var("FRANGIPANE_JWT_SECRET").unwrap_or_else(|_| DEFAULT_SECRET_KEY.to_string());
encode(
&Header::default(),
@@ -68,7 +68,7 @@ pub fn verify_jwt(headers: HeaderMap) -> Result<Claims, (StatusCode, String)> {
.ok_or((StatusCode::UNAUTHORIZED, "Missing token".to_string()))?;
let secret =
std::env::var("CHATAPP_JWT_SECRET").unwrap_or_else(|_| DEFAULT_SECRET_KEY.to_string());
std::env::var("FRANGIPANE_JWT_SECRET").unwrap_or_else(|_| DEFAULT_SECRET_KEY.to_string());
decode::<Claims>(
token,