# 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:

```python
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**

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.[ Find out more here.](/authentication/github.md)

#### **LinkedIn**

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.](/authentication/linkedin.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shipwithdjango.com/authentication/default-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
