MattPlum / SecureCloudComputingProject

0 stars 1 forks source link

Google Authentication working with Next-Auth but user/session data is not showing up on firebase #2

Closed amisir0219 closed 3 years ago

amisir0219 commented 3 years ago

Google Authentication is working fine and logging in any users with a google account but data is not showing up on firestore database. Supposedly need to implement FirebaseAdapter for next-auth but getting this error:

pages/api/auth/[...nextauth].js (18:27) @ eval

16 | // ...add more providers here 17 | ],

18 | adapter: FirebaseAdapter(db), | ^ 19 | 20 | callbacks: { 21 | async sessionStorage({session, token, user}){

Will continue to troubleshoot.

amisir0219 commented 3 years ago

Found out what the issue was. Firebase was recently upgraded to version 9 and the next-auth firebase adapter has issues working with this new version. Fixed by downgrading to Firebase 8.6.2. With this version the adapter works perfectly as expected with user data populating on firestore upon each login. Had issues where the data was still not populating after implementing the firebase adapter with no errors showing. Fixed by Empty Cache and Hard Reloading the page.