From 20e1953c24063519b941f38b3c02d7ddc3e9d2ca Mon Sep 17 00:00:00 2001 From: Dave Berner Date: Thu, 26 Oct 2023 08:25:57 +1100 Subject: [PATCH] fix: prevent login screen always being shown --- src/utils/generateAuthUrl.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/utils/generateAuthUrl.js b/src/utils/generateAuthUrl.js index 1624bb2..88203a7 100644 --- a/src/utils/generateAuthUrl.js +++ b/src/utils/generateAuthUrl.js @@ -15,10 +15,13 @@ export function generateAuthUrl(options, type = 'login') { scope: config.scope, code_challenge: options.code_challenge, code_challenge_method: config.codeChallengeMethod, - state: options.state, - start_page: type === 'register' ? 'registration' : 'login' + state: options.state }; + if (type === 'register') { + searchParams.start_page = 'registration'; + } + if (org_code) { searchParams.org_code = org_code; }