Skip to content

Commit

Permalink
fix: enhance tenantId validation in login route
Browse files Browse the repository at this point in the history
  • Loading branch information
antosubash committed Feb 11, 2025
1 parent 0b5e812 commit 559a418
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/src/app/auth/login/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ export async function GET() {
const openIdClientConfig = await getClientConfig()
let tenantId = session.tenantId

if (!tenantId || tenantId === 'default') {
if (!tenantId || tenantId === 'default' || (typeof tenantId === 'object' && Object.keys(tenantId).length === 0)) {
tenantId = ''
}


console.log('Login route: tenantId:', tenantId)

let parameters: Record<string, string> = {
Expand Down

0 comments on commit 559a418

Please sign in to comment.