Sunday, 12 July 2020

good auth workflow for react-native app and express backend server

I have developed my express server and react-native app. Now after signin through app, my express server sends JWT token to the client so that my client will send same token for further server requests.Now, I have set the server side cookie with token which will expire after some time. So I have to generate new token. So I have to tell my client to signin again which I don't want. What should I do in this case so that login remains persistent or something I can do under the hood so that my client won't need signin again and again when jwt token expires...I really have feeling that there is simple solution to this. Also, are there any good APIs ( other than auth0 bcz it looks overpriced. ) for authentication. Can I do this passport? Can someone please share the code?

Submitted July 13, 2020 at 02:55AM by mayuraitavadekar

No comments:

Post a Comment