Why is Router.useSearch() Returning an Incorrect Google ID After Passport.js Authentication in TanStack Router? #3185
-
I am encountering an issue while trying to retrieve the Google ID using return res.redirect(${process.env.FRONTEND_URL}/signup/addOtherInfo?email=${user.email}&googleId=${user.googleId}`); However, on the frontend, when I attempt to access the Google ID and email using: const { email, googleId } = Route.useSearch();` I can successfully retrieve the email, but the Google ID is incorrect. It shows After researching the issue, I learned that this might be due to JavaScript's Could you please guide me on how to retrieve the correct Google ID in my component while using TanStack Router?" |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
As you pointed out, you cannot treat this large value as a
|
Beta Was this translation helpful? Give feedback.
As you pointed out, you cannot treat this large value as a
number
in JS. Here is a solution that parses the value as bignumber:https://stackblitz.com/edit/tanstack-router-2wgeegss?file=src%2Froutes%2Fabout.tsx,src%2Fmain.tsx&preset=node