mirror of
https://forgejo.ellis.link/continuwuation/continuwuity/
synced 2026-10-15 05:49:55 +00:00
fix: Don't bail on unrecognized OAuth scopes
This commit is contained in:
@@ -145,12 +145,8 @@ pub fn to_scopes(&self) -> Result<HashSet<RequestedScope>, String> {
|
||||
} else if let Some(captures) = device_token_regex.captures(token) {
|
||||
scopes
|
||||
.insert(RequestedScope::Device(captures.get(2).unwrap().as_str().into()))
|
||||
} else if token == "openid" {
|
||||
// TODO(unspecced): Element sets this scope but doesn't use
|
||||
// it for anything
|
||||
true
|
||||
} else {
|
||||
return Err(format!("Invalid scope: {token}"));
|
||||
continue;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user