Wednesday 19 June 2019

Authentication Logic - React Native <-> Node

Hey,​I am developing a little app on React Native, using Node as a Backend (w/ MongoDB). On my app there is 3 ways of register/login: Google, Facebook and normal way inserting Username and Password desired.​On front-end side, on React, I am using OAuth to login on Facebook and Google, sucessfully and getting a token, which I am storing on MongoDB. If the User chooses to use the normal way, I generate a token, store it and send it to the User.At the same time, I store these tokens locally, so when I made another request to another node endpoint, I am sending also the User_ID and that token, so I can validate the User before returning something.​Is this correct? Am I doing this too basic?Thanks in advance

Submitted June 19, 2019 at 02:20PM by RevolutionaryDog0

No comments:

Post a Comment