Facebook strategy not working with @nuxtjs/auth and @nuxtjs/auth-next #1496
Replies: 2 comments
-
Hey @giovannilaperna, I'm piping the request through a Django backend with allauth, which then in turn sends the request to Facebook. So the config for your case should be different, but here is what works for me: facebook: {
clientId: process.env.FACEBOOK_CLIENT_ID,
responseType: 'code',
endpoints: {
token: process.env.BACKEND_URL + '/auth/social/facebook/',
userInfo: process.env.API_URL + '/user/',
},
token: {
// By default the token type is Bearer, but simple_jwt is configured
// to accept only JWT tokens.
type: 'JWT',
},
}, Note that it has Hope that helps. |
Beta Was this translation helpful? Give feedback.
-
@toniengelhardt my configuration works correctly in SPA mode. Strange that it doesn't work in universal mode. |
Beta Was this translation helpful? Give feedback.
-
Version
module: 4.9.1 and 5.0.0-1637745161.ea53f98
nuxt: 2.15.8
Nuxt configuration
mode:
Nuxt configuration
4.9.1 and 5.0.0-1637745161.ea53f98
Reproduction
For 4.9.1
git clone https://github.com/giovannilaperna/nuxt-facebook-login.git
cd nuxt-facebook-login
npm install
nuxt
For 5.0.0-1637745161.ea53f98
git clone https://github.com/giovannilaperna/nuxt-next-facebook-login.git
cd nuxt-next-facebook-login
npm install
nuxt
What is expected?
Login using facebook and redirected to /account/ path
What is actually happening?
With 4.9.1
Works locally
Doesn't work when deployed. auth.strategy cookies always set to local. See https://nuxt-facebook-login.netlify.app/
With 5.0.0-1637745161.ea53f98
Doesn't work locally neither deployed.
In both case get facebook page with Sorry, something went wrong. See https://nuxt-next-facebook-login.netlify.app
Steps to reproduce
git clone the linked repos and run nuxt
Additional information
Checklist
Beta Was this translation helpful? Give feedback.
All reactions