Skip to content

Commit eaac9d2

Browse files
committed
fix(auth): redirect to login without stale callbackUrl on account switch
1 parent e268bfb commit eaac9d2

File tree

1 file changed

+1
-2
lines changed
  • apps/sim/app/(auth)/oauth/consent

1 file changed

+1
-2
lines changed

apps/sim/app/(auth)/oauth/consent/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,10 @@ export default function OAuthConsentPage() {
100100
)
101101

102102
const handleSwitchAccount = useCallback(async () => {
103-
const currentUrl = window.location.href
104103
await signOut({
105104
fetchOptions: {
106105
onSuccess: () => {
107-
window.location.href = `/login?callbackUrl=${encodeURIComponent(currentUrl)}`
106+
window.location.href = '/login'
108107
},
109108
},
110109
})

0 commit comments

Comments
 (0)