A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
fix(app): return to the OAuth request after signing in (#3584)
Hampus63334087a338
diff --git a/fluxer_app/src/features/auth/components/pages/oauth_authorize_page/OAuthAccountStep.tsx b/fluxer_app/src/features/auth/components/pages/oauth_authorize_page/OAuthAccountStep.tsxindex cda5784bd..ff8269a9f 100644--- a/fluxer_app/src/features/auth/components/pages/oauth_authorize_page/OAuthAccountStep.tsx+++ b/fluxer_app/src/features/auth/components/pages/oauth_authorize_page/OAuthAccountStep.tsx@@ -64,8 +64,12 @@ function initialSignInPurpose(return null;}+function currentPagePath(): string {+ return `${window.location.pathname}${window.location.search}`;+}+function currentPageLoginPath(): string {- return setPathQueryParams(Routes.LOGIN, {redirect_to: `${window.location.pathname}${window.location.search}`});+ return setPathQueryParams(Routes.LOGIN, {redirect_to: currentPagePath()});}interface OAuthAccountStepProps {@@ -167,7 +171,7 @@ export const OAuthAccountStep: React.FC<OAuthAccountStepProps> = observer(<AccountSwitcherAuthFlowpurpose={signInPurpose}renderFrame={null}- redirectAfterLogin={null}+ redirectAfterLogin={currentPagePath()}focusOnEntry={focusSignInOnShow}exitCancels={accounts.length === 0}onExit={accounts.length === 0 ? onCancel : backToAccounts}