Skip to content

Social Login inplementation with dj-rest-auth. React is used for frontend. Dockerized. Nginx as Reverse Proxy.

Notifications You must be signed in to change notification settings

abror2142/social-login-with-dj_rest_auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Social Login With Django

The Social Login feature has been implemented using dj-rest-auth library.

By using dj-rest-auth library, we can have a social login system suitable for REST API based projects.

You have to have a Client ID and Secret Key to be able to use this feature.

HOW TO BUILD THIS PROJECT?

The project is Dockerized which makes it easy to run locally and deploy to a server.

The Main requirement is you need to have Docker installed on your machine.

Steps to follow:

  1. GENERATE keys. You need to generate social app keys for GitHub and Google.
  2. RENAME the .env files.
    • Rename .env.developer file to .env
    • Rename .env-react.developer file to .env-react
  3. PLACE the keys to correct spots in both .env and .env-react files.
  4. RUN docker compose up.
  5. VISIT http://localhost:5173 to view and test the project!

HOW TO GENERATE SOCIAL APP KEYS?

To be able to use the social login features of the providers(like GitHub, Google, FaceBook...), you need to create a social/OAuth app using your account with each provider.

Unfortunately, creating these apps is provider-specific which makes the process a bit hard for beginners.

Here are some tutorials you can use:

Don't forget to have fun! :)