Ugly fix for removing bearer prefix from auth header

This commit is contained in:
Imbus 2024-03-22 21:48:11 +01:00
parent c5a25ad714
commit e946dc456d

View file

@ -75,7 +75,9 @@ pub async fn engage_post(
.to_str()
.unwrap();
let claims = auth.decode(token);
// Remove the Bearer prefix
let token = token.replace("Bearer ", "");
let claims = auth.decode(&token);
if let Err(e) = claims {
info!("Error validating token: {}", e);