flask-social-oauth


Nameflask-social-oauth JSON
Version 1.2.0 PyPI version JSON
download
home_pageNone
SummaryFlask Social Login is a Python package that simplifies the integration of social login functionality into Flask web applications. With support for popular social authentication providers like Google, GitHub, and Discord, Flask Social Login streamlines the authentication process for users and enables seamless access to your web application.
upload_time2024-04-08 08:36:18
maintainerNone
docs_urlNone
authorNone
requires_python>=3.1
licenseNone
keywords flask social auth login oauth google github discord
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Flask Social OAuth

Flask Social OAuth is a Python package that simplifies the integration of social oauth functionality into Flask web applications. With support for popular social authentication providers like Google, GitHub, and Discord, Flask Social OAuth streamlines the authentication process for users and enables seamless access to your web application.

## Installation

You can install Flask Social OAuth via pip:

```bash
pip install flask-social-oauth
```

## Quick Start

```python
from flask import Flask, session
from flask_social_oauth import Config, initialize_social_login

app = Flask(__name__)
app.secret_key = 'your_secret_key'

# Configure social authentication providers
config = Config()
config.google_auth(
    google_auth_client_id="your_client_id",
    google_auth_client_secret="your_client_secret"
)
config.github_auth(
    github_auth_client_id="your_client_id",
    github_auth_client_secret="your_client_secret"
)
config.discord_auth(
    discord_auth_client_id="your_client_id",
    discord_auth_client_secret="your_client_secret"
)

# Initialize social login
initialize_social_login(session, app, config)

if __name__ == '__main__':
    app.run(debug=True)
```

## Supported Providers

- Google
- GitHub
- Discord

## Detailed Description

### Config Class

The `Config` class is used to define the configuration settings for Flask Social Login package. It provides methods to configure authentication parameters for different social providers.

#### Methods

- `google_auth()`: Configures Google authentication parameters.
- `github_auth()`: Configures GitHub authentication parameters.
- `discord_auth()`: Configures Discord authentication parameters.

### initialize_social_login Function

The `initialize_social_login()` function is used to initialize social login for the Flask app using the provided configuration settings. It registers URL routes and handlers for social authentication providers.

#### Parameters

- `session`: The Flask session object.
- `app`: The Flask app instance.
- `config`: The configuration settings for Flask Social Login package.

### Google Handlers

#### `google_login_handler()`

Handles the initiation of the Google OAuth login flow.

#### Parameters

- `config`: The configuration settings for Flask Social Login package.

#### `google_callback_handler()`

Handles the Google OAuth callback flow.

#### Parameters

- `config`: The configuration settings for Flask Social Login package.
- `session`: The Flask session object.

### GitHub Handlers

#### `github_login_handler()`

Handles the initiation of the GitHub OAuth login flow.

#### Parameters

- `config`: The configuration settings for Flask Social Login package.

#### `github_callback_handler()`

Handles the GitHub OAuth callback flow.

#### Parameters

- `config`: The configuration settings for Flask Social Login package.
- `session`: The Flask session object.

### Discord Handlers

#### `discord_login_handler()`

Handles the initiation of the Discord OAuth login flow.

#### Parameters

- `config`: The configuration settings for Flask Social Login package.

#### `discord_callback_handler()`

Handles the Discord OAuth callback flow.

#### Parameters

- `config`: The configuration settings for Flask Social Login package.
- `session`: The Flask session object.

## Documentation

For more detailed usage and configuration, please refer to the [documentation](https://docs.om-mishra.com/flask-social-oauth).

## Issues and Contributions

If you encounter any issues or have suggestions for improvements, feel free to open an issue on [GitHub](https://github.com/om-mishra7/flask-social-oauth/issues). Contributions are also welcome!

## License

Flask Social OAuth is released under the [MIT License](https://github.com/om-mishra7/flask-social-oauth/blob/main/LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "flask-social-oauth",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.1",
    "maintainer_email": null,
    "keywords": "flask, social, auth, login, oauth, google, github, discord",
    "author": null,
    "author_email": "Om Mishra <hello@om-mishra.com>",
    "download_url": "https://files.pythonhosted.org/packages/ed/f4/d96d06558f3b79745d8517df41567d983c1cc53cf0931a06aea532652d67/flask_social_oauth-1.2.0.tar.gz",
    "platform": null,
    "description": "# Flask Social OAuth\n\nFlask Social OAuth is a Python package that simplifies the integration of social oauth functionality into Flask web applications. With support for popular social authentication providers like Google, GitHub, and Discord, Flask Social OAuth streamlines the authentication process for users and enables seamless access to your web application.\n\n## Installation\n\nYou can install Flask Social OAuth via pip:\n\n```bash\npip install flask-social-oauth\n```\n\n## Quick Start\n\n```python\nfrom flask import Flask, session\nfrom flask_social_oauth import Config, initialize_social_login\n\napp = Flask(__name__)\napp.secret_key = 'your_secret_key'\n\n# Configure social authentication providers\nconfig = Config()\nconfig.google_auth(\n    google_auth_client_id=\"your_client_id\",\n    google_auth_client_secret=\"your_client_secret\"\n)\nconfig.github_auth(\n    github_auth_client_id=\"your_client_id\",\n    github_auth_client_secret=\"your_client_secret\"\n)\nconfig.discord_auth(\n    discord_auth_client_id=\"your_client_id\",\n    discord_auth_client_secret=\"your_client_secret\"\n)\n\n# Initialize social login\ninitialize_social_login(session, app, config)\n\nif __name__ == '__main__':\n    app.run(debug=True)\n```\n\n## Supported Providers\n\n- Google\n- GitHub\n- Discord\n\n## Detailed Description\n\n### Config Class\n\nThe `Config` class is used to define the configuration settings for Flask Social Login package. It provides methods to configure authentication parameters for different social providers.\n\n#### Methods\n\n- `google_auth()`: Configures Google authentication parameters.\n- `github_auth()`: Configures GitHub authentication parameters.\n- `discord_auth()`: Configures Discord authentication parameters.\n\n### initialize_social_login Function\n\nThe `initialize_social_login()` function is used to initialize social login for the Flask app using the provided configuration settings. It registers URL routes and handlers for social authentication providers.\n\n#### Parameters\n\n- `session`: The Flask session object.\n- `app`: The Flask app instance.\n- `config`: The configuration settings for Flask Social Login package.\n\n### Google Handlers\n\n#### `google_login_handler()`\n\nHandles the initiation of the Google OAuth login flow.\n\n#### Parameters\n\n- `config`: The configuration settings for Flask Social Login package.\n\n#### `google_callback_handler()`\n\nHandles the Google OAuth callback flow.\n\n#### Parameters\n\n- `config`: The configuration settings for Flask Social Login package.\n- `session`: The Flask session object.\n\n### GitHub Handlers\n\n#### `github_login_handler()`\n\nHandles the initiation of the GitHub OAuth login flow.\n\n#### Parameters\n\n- `config`: The configuration settings for Flask Social Login package.\n\n#### `github_callback_handler()`\n\nHandles the GitHub OAuth callback flow.\n\n#### Parameters\n\n- `config`: The configuration settings for Flask Social Login package.\n- `session`: The Flask session object.\n\n### Discord Handlers\n\n#### `discord_login_handler()`\n\nHandles the initiation of the Discord OAuth login flow.\n\n#### Parameters\n\n- `config`: The configuration settings for Flask Social Login package.\n\n#### `discord_callback_handler()`\n\nHandles the Discord OAuth callback flow.\n\n#### Parameters\n\n- `config`: The configuration settings for Flask Social Login package.\n- `session`: The Flask session object.\n\n## Documentation\n\nFor more detailed usage and configuration, please refer to the [documentation](https://docs.om-mishra.com/flask-social-oauth).\n\n## Issues and Contributions\n\nIf you encounter any issues or have suggestions for improvements, feel free to open an issue on [GitHub](https://github.com/om-mishra7/flask-social-oauth/issues). Contributions are also welcome!\n\n## License\n\nFlask Social OAuth is released under the [MIT License](https://github.com/om-mishra7/flask-social-oauth/blob/main/LICENSE).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Flask Social Login is a Python package that simplifies the integration of social login functionality into Flask web applications. With support for popular social authentication providers like Google, GitHub, and Discord, Flask Social Login streamlines the authentication process for users and enables seamless access to your web application.",
    "version": "1.2.0",
    "project_urls": {
        "Homepage": "https://docs.om-mishra.com/flask-social-oauth",
        "Issues": "https://github.com/om-mishra7/flask-social-oauth/issues",
        "Repository": "https://github.com/om-mishra7/flask-social-oauth"
    },
    "split_keywords": [
        "flask",
        " social",
        " auth",
        " login",
        " oauth",
        " google",
        " github",
        " discord"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3af105c4cdb06b2b53f6ff92490452bbd589256fd41c53b9b7f3642a597ce678",
                "md5": "27cb5b5ac5d51359fac725a34dcfdb5f",
                "sha256": "b4ca960fcac25ba9e07bc1e88a1ecaa5f7a43fb6da0794a406c2fe7dbf231df2"
            },
            "downloads": -1,
            "filename": "flask_social_oauth-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "27cb5b5ac5d51359fac725a34dcfdb5f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.1",
            "size": 8071,
            "upload_time": "2024-04-08T08:36:16",
            "upload_time_iso_8601": "2024-04-08T08:36:16.270180Z",
            "url": "https://files.pythonhosted.org/packages/3a/f1/05c4cdb06b2b53f6ff92490452bbd589256fd41c53b9b7f3642a597ce678/flask_social_oauth-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "edf4d96d06558f3b79745d8517df41567d983c1cc53cf0931a06aea532652d67",
                "md5": "87f3355a30c683658644d46931cba275",
                "sha256": "b1848b84706b00eb0fb9fbe6972e6c222b600f9491c63b85bcddb618b1cfb6df"
            },
            "downloads": -1,
            "filename": "flask_social_oauth-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "87f3355a30c683658644d46931cba275",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.1",
            "size": 8058,
            "upload_time": "2024-04-08T08:36:18",
            "upload_time_iso_8601": "2024-04-08T08:36:18.044911Z",
            "url": "https://files.pythonhosted.org/packages/ed/f4/d96d06558f3b79745d8517df41567d983c1cc53cf0931a06aea532652d67/flask_social_oauth-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-08 08:36:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "om-mishra7",
    "github_project": "flask-social-oauth",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "flask-social-oauth"
}
        
Elapsed time: 0.23643s