callback for google auth trying to send to old domain.
I switched domain urls that I'm hosting on. I changed everything in my wasp.main file and appropriately throughout the page. I even updated the callback urls and authorized domains in the google cloud api console. When I try to log in a new user, it tries to callback the old URL. Where do I fix this @kapa.ai ?
5 Replies
Hi @Cubs. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
It seems like you've already updated your
main.wasp
file and the Google Cloud API console, which are the primary places to update your callback URLs. However, there might be a few other places to check:
1. If you're using OAuth setup, ensure that you've updated the configFn
for the OAuth providers. The object returned from configFn
no longer needs to include the Client ID and the Client Secret. You can remove them from the object that configFn
returns. Here's an example of how it should look:
(Source: Migrate your OAuth setup (https://wasp-lang.dev/docs/migrate-from-0-12-to-0-13#migrate-your-oauth-setup))
2. Check if you have any hardcoded URLs in your application that might still be pointing to the old domain.
3. If you're using social login, ensure that the redirect URLs for Google are updated in your Wasp's docs.
(Source: Creating a Google OAuth App (https://wasp-lang.dev/docs/auth/social-auth/google#3-creating-a-google-oauth-app))
If you've checked all these and the issue persists, it might be a caching issue. Try clearing your browser cache or testing in an incognito window. If none of these work, you might want to reach out to the Wasp community for further assistance.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Cubs, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?Might it be that it just took some time for changes to take effect?
If you updated all of it on the Google side, and also in the Wasp code, there is not much left, except for possibly env vars up there on your hosting provider (e.g. Fly) -> make sure those are also updated to the new domain!
And env vars in .env.client and .env.server also of course, but I assume you are talking about problems with the deployed app, not in the development.
Redirect is generated based on env vars you set in the
.env.server
(in dev) and env vars you set in your cloud provider (in production). Did you maybe forget to update the env vars? Did you restart your app after the env var update?Thanks that was exactly it, I had them set in my deployment but not in my dev environment. Fixed
THE Novak AI Apps
AI tools that melt faces