Skip to content

Configuring Social Authentication in Django Admin

1. Steps to Configure Facebook Authentication

  1. Login to Django Admin as a superuser.
  2. Navigate to Social Accounts app.
  3. Open the Social Application model.
  4. Configure the application with the following details:
Field Value
Provider Facebook
Client ID <your_client_id>
Secret Key <your_secret_key>
Sites example.com
  1. Click Add to save the configuration.

Then Navigate to Core app.

  1. Open the Social login setting model.
  2. Configure the application with the following details:
Field Value
name Facebook
redirect uri https://api.example.com/auth/facebook/callback/
  1. Click Add to save the configuration.

2. Steps to Configure Google Authentication

  1. Login to Django Admin as a superuser.
  2. Navigate to Social Accounts app.
  3. Open the Social Application model.
  4. Configure the application with the following details:
Field Value
Provider Google
Client ID <your_client_id>
Secret Key <your_secret_key>
Sites example.com
  1. Click Add to save the configuration.

Then Navigate to Core app.

  1. Open the Social login setting model.
  2. Configure the application with the following details:
Field Value
name Google
redirect uri https://api.example.com/auth/google/callback/
  1. Click Add to save the configuration.