We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5700c0 commit 1442738Copy full SHA for 1442738
web/src/core/usecases/userAuthentication/thunks.ts
@@ -20,7 +20,10 @@ export const protectedThunks = {
20
21
export const thunks = {
22
login: () => async () => {
23
- window.location.href = `${apiUrl}/auth/login`;
+ const currentUrl =
24
+ window.location.pathname + window.location.search + window.location.hash;
25
+ const redirectUrl = encodeURIComponent(`${window.location.origin}${currentUrl}`);
26
+ window.location.href = `${apiUrl}/auth/login?redirectUrl=${redirectUrl}`;
27
},
28
logout: () => async () => {
29
window.location.href = `${apiUrl}/auth/logout`;
0 commit comments