Google and Facebook providers not properly working in production #1516
Replies: 7 comments
-
Found any solution to this issue? |
Beta Was this translation helpful? Give feedback.
-
@RonAlmog Its due to my nginx config issue on my server, proxy cache |
Beta Was this translation helpful? Give feedback.
-
Hey @rosnaib11 , can I bug you with 2 quick questions:
for me, the authStrategy does not change, and stays 'local' all the time. i'm trying to debug. my questions: who is changing the authStrategy, and causing it to be 'facebook' instead of 'local'? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
perfect, thanks. |
Beta Was this translation helpful? Give feedback.
-
Its a generated JWT token
|
Beta Was this translation helpful? Give feedback.
-
great stuff, thanks so much for your help! |
Beta Was this translation helpful? Give feedback.
-
Version
module: 5.0.0-1618898588.9655d0e
nuxt: 2.15.2
Nuxt configuration
mode:
Nuxt configuration
auth.js
nuxt.config.js
What is expected?
Should able to login after redirect back to my website from google/facebook auth.
What is actually happening?
After redirected back nothing happens.
Steps to reproduce
When I tried to login using google/facebook auth, by default the authStrategy is set to
local
The moment I click the google/facebook button
this.$auth.loginWith('google')
,authStrategy
switch to google temporarily and after authenticating and redirected back to my website it switched back toauthStrategy
local again instead of google. So my auth middleware not getting the proper settingsI should get
google
authStrategy not local again. If I add local on this condition, I can login but when I open my website in new tab I'm not logged in because it duplicates authStrategy in my localstorage and cookies, so its two authStrategy local and googleauth.js
In my localhost dev mode it working fine, only happens when I deploy in live server. Or maybe because of my server? I'm using nginx with SSL. Seems it doesn't save my previous cookie settings after redirect back
Beta Was this translation helpful? Give feedback.
All reactions