From 6a4f6e555dc645626eff3d17c6cb7c2f54aef604 Mon Sep 17 00:00:00 2001 From: Jose Buitron Date: Tue, 3 Oct 2023 16:59:22 -0500 Subject: [PATCH] fix: Add root path to account url --- src/account/components/AccountLogin.js | 2 +- src/account/components/AccountLogin.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/account/components/AccountLogin.js b/src/account/components/AccountLogin.js index 024628051c..bb5e6fd3aa 100644 --- a/src/account/components/AccountLogin.js +++ b/src/account/components/AccountLogin.js @@ -46,7 +46,7 @@ const GoogleIcon = props => { const appendReferrer = (url, referrer) => { return referrer - ? `${url}&state=account?referrerBase64=${btoa(referrer)}` + ? `${url}&state=/account?referrerBase64=${btoa(referrer)}` : url; }; diff --git a/src/account/components/AccountLogin.test.js b/src/account/components/AccountLogin.test.js index 9b27bf39af..31b1c66c19 100644 --- a/src/account/components/AccountLogin.test.js +++ b/src/account/components/AccountLogin.test.js @@ -74,7 +74,7 @@ test('AccountLogin: Add referrer', async () => { ); await render(); expect(screen.getByText('Continue with Google')).toBeInTheDocument(); - const state = `account?referrerBase64=${btoa(referrer)}`; + const state = `/account?referrerBase64=${btoa(referrer)}`; expect(screen.getByText('Continue with Google')).toHaveAttribute( 'href', `google.url&state=${state}`