Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

217
Visualizações
next-auth Providers.Facebook works on localhost but when deployed to vercel it doesn't

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
  ],
});
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda