Skip auth check for biome auth routes
Updates the authorization middleware for the Actix REST API to skip
authorization for the `/biome/register`, `/biome/login`, and
`/biome/token` endpoints, since these endpoints are used to get
authentication credentials.
@@ -47,6 +47,10 @@ fn authorize(
) -> AuthorizationResult {
// Authorization isn't necessary when using one of the authorization endpoints
let mut is_auth_endpoint = false;
+ #[cfg(feature = "biome-credentials")]
+ if endpoint == "/biome/register" || endpoint == "/biome/login" || endpoint == "/biome/token" {
+ is_auth_endpoint = true;
+ }
#[cfg(feature = "oauth")]
if endpoint.starts_with("/oauth") {
is_auth_endpoint = true;
