mirror of
https://github.com/tale/headplane.git
synced 2026-08-27 15:37:04 +00:00
fix: handle URI components in provider ID
This commit is contained in:
@@ -29,7 +29,8 @@ function findCurrentUser(users: User[], subject: string | undefined): User | und
|
||||
if (u.provider !== "oidc" || !u.providerId) {
|
||||
return false;
|
||||
}
|
||||
return u.providerId.split("/").pop() === subject;
|
||||
const segment = u.providerId.split("/").pop();
|
||||
return segment ? decodeURIComponent(segment) === subject : false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user