Skip to content

Commit

Permalink
fix: Don't redirect evrything to / on Home
Browse files Browse the repository at this point in the history
  • Loading branch information
Zenoo committed Oct 2, 2024
1 parent 86aae1c commit 9ea155f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions client/src/views/HomeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ const HomeView = () => {
const code = url.searchParams.get('code');

// Default URL to website root, clear all OAuth search params.
url.pathname = '/';
url.searchParams.delete('code');
url.searchParams.delete('state');
if (url.pathname === '/oauth/callback') {
url.pathname = '/';
url.searchParams.delete('code');
url.searchParams.delete('state');
}

if (code && !authing && !user) {
setAuthing(true);
Expand Down

0 comments on commit 9ea155f

Please sign in to comment.