Closed andrewMacmurray closed 8 years ago
If you want to use React, your authentication system will have to live on the front-end, and your API calls will need to be sent with keys and validated server-side as appropriate. See here for a guide that uses reflux.
I suspect it might be simpler to drop React and just go with server-side rendering w/ templates if working on an app that needs user accounts.
Thanks Elias, have somewhat solved this in a branch authenticating with twitter server side. Reflux looks interesting. Definitely gonna have a look at server side rendering
Would be great to have a some user auth boilerplate, Hapi has a great plugin called Bell for authentication which could be worth looking into.
The current resource routes would probably need reconfiguring (ReactUrls.js that re-serves index.html to keep react-router happy would likely interfere with an auth route)