The issue you're facing is related to the NEXTAUTH_URL environment variable. This variable should reflect the URL of your production site, but it seems like it's currently set to <http://localhost:8282.>
To fix this, you need to update your NEXTAUTH_URL environment variable to reflect your production site URL. This is the URL that Google uses to redirect users after they have authenticated with Google.
Here's how you can do it:
-
In your production environment, set the NEXTAUTH_URL environment variable to your production site URL. For example, if your production site URL is <https://myapp.com,> then NEXTAUTH_URL should be set to <https://myapp.com.>
-
Update the Authorized redirect URI in your Google OAuth provider settings to match the NEXTAUTH_URL value.
Please note that Google does not allow you to add localhost subdomains as an Authorized redirect URI. If you're testing in a local environment, you can use a different localhost port (e.g. localhost:8888) instead of app.localhost:3000 ^1^.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: