This is the code for the blog post Secure Your ReactJS App with Auth0 Authentication. In this blog post, I show you how to secure your ReactJS app with Auth0 authentication. Auth0 is a flexible, drop-in solution to add authentication and authorization services to your applications. Auth0 provides a universal authentication and authorization platform for web, mobile, and legacy applications. It is a cloud-based service that provides a set of unified APIs and tools that instantly enables single sign-on and user management for all of your applications.
by https
git clone https://github.com/jimenezraul/Secure-Your-ReactJS-App-with-Auth0-Authentication.git
by ssh
git clone git@github.com:jimenezraul/Secure-Your-ReactJS-App-with-Auth0-Authentication.git
or download the zip file.
cd Secure-Your-ReactJS-App-with-Auth0-Authentication
npm install
- Go to the Auth0 Dashboard and click on the "Create Application" button.
- Name your new app and select "Single Page Web Applications".
- Click on the "Create" button.
- Go to the "Settings" tab and add
http://localhost:3000
to the "Allowed Callback URLs", "Allowed Web Origins", and "Allowed Logout URLs" fields. - Click on the "Save Changes" button.
- Go to the "Quick Start" tab and select "React" and get the domain and client ID.
- Go to the
src
folder and edit file calledauth_config.js
. Replace thedomain
andclientId
with the ones you got from the Auth0 Dashboard.
npm start
Raul Jimenez