Google Auth callback URL gets called twice
Hey, after picking up a Google account and getting back from the consent screen the callback is fired twice for some reason. Haven't seen anything like this before, is this an issue on my side, or Wasp user's code cant affect the login process?
9 Replies
My .wasp file
Login page
and auth google.ts config
This looks like a React 18 issue @Filip
https://stackoverflow.com/questions/72489140/react-18-strict-mode-causing-component-to-render-twice
Stack Overflow
React 18 strict mode causing component to render twice
The changes to strict-mode in React version 18 causes my code to render twice, which causes an error in axios abort controller, but I don't know how to clear the error from the browser console afte...
Are you using the canary version?
Yep
Note, this only happens in Strict + development mode. In a production build, effects will only be called once and when their dependencies change.
-- indeed, after I've deployed the app to Fly it works fine (because it's not in dev mode anymore)Wohooo @maksym36ua, you just became a Waspeteer level 25!
It's something we should look into and fix if it's fixable 🙂 good catch Maks
This is due to React's StrictMode, yes! @miho shoudl we open an issue for it? We can probalby handle it by modifying our components?