fix: handle URI components in provider ID

This commit is contained in:
Aarnav Tale
2026-04-06 21:17:31 -04:00
parent dc44cc4155
commit 61e7303363
2 changed files with 4 additions and 2 deletions
@@ -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;
});
}
+2 -1
View File
@@ -12,7 +12,8 @@ export function getOidcSubject(user: User): string | undefined {
return;
}
return user.providerId.split("/").pop();
const segment = user.providerId.split("/").pop();
return segment ? decodeURIComponent(segment) : segment;
}
/**