Skip to content

fix: AuthContext uses undefined location.pathname#32

Open
wangwangbobo wants to merge 1 commit into
Dream-World-Coder:mainfrom
wangwangbobo:fix-authcontext-useLocation
Open

fix: AuthContext uses undefined location.pathname#32
wangwangbobo wants to merge 1 commit into
Dream-World-Coder:mainfrom
wangwangbobo:fix-authcontext-useLocation

Conversation

@wangwangbobo
Copy link
Copy Markdown
Contributor

Bug

The handleGoogleAuthSuccess function referenced location.pathname but useLocation was never called, causing a ReferenceError on Google auth callback.

Impact

  • Google auth callback would crash with ReferenceError: location is not defined
  • Users would see an error page after Google OAuth redirect

Fix

Added useLocation hook import and call to make location available.

  • 1 file changed, 2 insertions, 1 deletion

The handleGoogleAuthSuccess function referenced location.pathname but
useLocation was never called, causing a ReferenceError on Google auth
callback.

Fix: import and call useLocation hook to make location available.
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

@wangwangbobo is attempting to deploy a commit to the Subhajit Gorai's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant