So I'm using next-auth for the first time and I'm choosing facebook to be the provider. Everything works on localhost but the moment I deploy it to vercel and change the NEXTAUTH_URL from localhost:3000 to the deployed vercel url, when I try to sign in, I get:
Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.
In https://developers.facebook.com/apps, I changed it to live mode and added my new vercel link to the app domains list, I also updated the environment variable for NEXTAUTH_URL in vercel to be the new deployed link but it still doesnt work and I dont know what else to do. I read something about a callback url, could that be it? Deployed url: https://facebook-clone-five-theta.vercel.app/
[...nextauth].js:
import NextAuth from 'next-auth';
import Providers from 'next-auth/providers';
export default NextAuth({
// Configure one or more authentication providers
providers: [
Providers.Facebook({
clientId: process.env.FACEBOOK_CLIENT_ID,
clientSecret: process.env.FACEBOOK_CLIENT_SECRET,
}),
// ...add more providers here
],
});