mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +02:00
fix(mana-core-auth): fix TypeScript error in oidc-login controller
This commit is contained in:
parent
90f9f2c9f5
commit
fc15366efa
1 changed files with 2 additions and 2 deletions
|
|
@ -25,13 +25,13 @@ export class OidcLoginController {
|
|||
async getLoginPage(@Query() query: Record<string, string>, @Res() res: Response) {
|
||||
// Handle returnUrl parameter (when redirected from authorization endpoint)
|
||||
let returnUrl = query.returnUrl || '/';
|
||||
let clientId = query.client_id;
|
||||
let clientId: string | undefined = query.client_id;
|
||||
|
||||
// If no direct client_id but we have returnUrl, extract client_id from it
|
||||
if (!clientId && query.returnUrl) {
|
||||
try {
|
||||
const returnUrlParams = new URLSearchParams(query.returnUrl.split('?')[1] || '');
|
||||
clientId = returnUrlParams.get('client_id') || undefined;
|
||||
clientId = returnUrlParams.get('client_id') ?? undefined;
|
||||
} catch {
|
||||
// Ignore parsing errors
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue