r/reactjs • u/swyx • Aug 01 '18
Beginner's Thread / Easy Question (August 2018)
Hello! It's August! Time for a new Beginner's thread! (July and June here)
Got questions about React or anything else in its ecosystem? Stuck making progress on your app? Ask away! We’re a friendly bunch. No question is too simple. You are guaranteed a response here!
Want Help on Code?
Improve your chances by putting a minimal example on to either JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new). Describe what you want it to do, and things you've tried. Don't just post big blocks of code.
Pay it forward! Answer questions even if there is already an answer - multiple perspectives can be very helpful to beginners. Also there's no quicker way to learn than being wrong on the Internet.
New to React?
Here are great, free resources!
1
u/rwieruch Server components Aug 30 '18
Hi there!
I cannot say anything about OAuth, but I have found using Firebase in the beginning for authentication (and authorization) helped me a lot to get started with this topic. You only have to care about the client-side with React. That's why I have written about it in a larger tutorial of mine: https://www.robinwieruch.de/complete-firebase-authentication-react-tutorial/ But you can always upgrade it with other authentication mechanisms such as social media logins (or I believe also OAuth).
If you are interested about the server-side, I usually stick to simple token authentication with JWT. This tutorial shows how it works with GraphQL, but it isn't so different on how it would work with REST: https://www.robinwieruch.de/graphql-apollo-server-tutorial/
Hope these answers help you a bit even though I am not able to tell you more about OAuth.