Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

261
Views
How would I redirect the client to another page upon auth?

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?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

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.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!