fix(api): 🐛 Fix incorrect OAuth2 linking logic

This commit is contained in:
Jesse Wierzbinski 2024-05-16 20:58:27 -10:00
parent 2db4f25ba6
commit d4e1c0d95d
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

View file

@ -150,7 +150,7 @@ export class OAuthManager {
const { flow, userInfo } = oidcFlowData;
// Check if userId is equal to application.clientId
if ((flow.application?.clientId ?? "") !== userId) {
if (!flow.application?.clientId.startsWith(userId)) {
return response(null, 302, {
Location: `${config.http.base_url}${
config.frontend.routes.home