0

This is the code I run once a user clicks the Sign In button:

 app.post('/api/sign-in', function(req, res, next) {
firebase.auth().signInWithEmailAndPassword(req.body.email, req.body.password).then(function (user) {
console.log('a new user has signed in! their e-mail address: '+user.email+' | User ID: '+user.uid)
}).catch(function(error) {
console.log(error)
})
})

What would be the appropriate way of 'transferring' the user to another page (for example, members area)? Would I stick that code in the callback method?

huzal12
  • 79
  • 2
  • 10

1 Answers1

0

Your node server should probably return the auth token to the client, then the client handles the direct, probably using window.location. Though you could also return a 302 status.

Community
  • 1
  • 1
amuramoto
  • 2,838
  • 1
  • 11
  • 15