🚀
ShipWithDjango Documentation
  • Welcome to ShipWithDjango Documentation
  • When and How to use ShipWithDjango?
  • Getting Started
    • Obtaining a license
    • Downloading ShipWithDjango
    • Running locally
    • Next steps
  • Platform
    • Default Configuration
    • Subnavigation
  • Theme
    • Tailwind CSS
    • Configuration
  • Secret Management
    • Default Configuration
    • Setting your environment variables
    • Third-party providers
      • Infisical
      • AWS Secrets Manager
      • Azure Key Vault
    • Order of retrieval
  • Authentication
    • Default Configuration
    • GitHub
    • LinkedIn
  • Emailing
    • Default Configuration
    • Using SendGrid
    • Using SMTP
    • Using the task queue for sending emails
  • Payments & Billing
    • Billing
    • Stripe
  • OpenAI/Dall-E
    • Default Configuration
  • API
    • Django REST framework
    • Built-in API utilities
    • Postman
  • Logging
    • Default Configuration
    • Using Sentry
    • Using Better Stack
  • Localization
    • Translations
Powered by GitBook
On this page
  • Registrations
  • Third-Party Logins
  1. Authentication

Default Configuration

The authentication settings for ShipWithDjango are highly configurable, allowing you to control user registrations and enable or disable third-party logins with ease. These settings are managed through the CONFIG/authentication.py file, where you can adjust the configuration to suit your project’s needs.

Here’s a breakdown of the default configuration and how you can customize it:

ALLOW_REGISTRATIONS = True

# Third-party login
# Global setting. If this is disabled, all third-party login will be disabled.
# This setting needs to be set to True to enable ANY individual third-party login.
ALLOW_THIRD_PARTY_LOGIN = False

# LinkedIn
ALLOW_LINKED_IN_LOGIN = False
LINKED_IN_CLIENT_ID = None
LINKED_IN_CLIENT_SECRET = None

# Github
ALLOW_GITHUB_LOGIN = False
GITHUB_CLIENT_ID = None
GITHUB_CLIENT_SECRET = None

Registrations

The ALLOW_REGISTRATIONS setting controls whether new users can sign up for your application. If you set ALLOW_REGISTRATIONS to False, the signup page will be blocked, preventing any new registrations. This can be useful for maintaining a closed or invite-only platform.

Third-Party Logins

ShipWithDjango supports third-party logins through GitHub and LinkedIn, offering your users a convenient way to authenticate using their existing accounts.

Enabling Third-Party Logins

To enable third-party logins, you first need to set ALLOW_THIRD_PARTY_LOGIN to True. This global setting must be enabled for any individual third-party login (such as GitHub or LinkedIn) to function. If this is set to False, no third-party login options will be available, even if they are individually configured.

Github

LinkedIn

PreviousOrder of retrievalNextGitHub

Last updated 9 months ago

If you want to enable GitHub, you can do so by setting the ALLOW_GITHUB_LOGIN to True. Before you can integrate with GitHub, you will need to create an application in GitHub that can be used to authenticate with.

If you want to enable LinkedIn, you can do so by setting the ALLOW_LINKED_IN_LOGIN to True. Before you can integrate with LinkedIn, you will need to create an application in LinkedIn that can be used to authenticate with.

Find out more here.
Find out more here.