Facebook OAuth 2.0 / OAuth 2.1 / OIDC 1.0 login implementations for Swarmauri
Project description
Swarmauri Auth IDP Facebook
Facebook (Meta) OAuth 2.0, OAuth 2.1, and OIDC 1.0 login flows packaged for Swarmauri deployments.
Features
- PKCE-enabled authorization URL generation with signed state payloads.
- Token exchange helpers that normalize identity data via Graph
/meor verified ID tokens. - Built-in retrying HTTP client tuned for Facebook authorization and Graph endpoints.
- ComponentBase-compatible models registering under
swarmauri.auth_idpentry points. - Support for both user-facing browser flows and confidential client OIDC integrations.
Installation
pip
pip install swarmauri_auth_idp_facebook
uv (project)
uv add swarmauri_auth_idp_facebook
uv (environment)
uv pip install swarmauri_auth_idp_facebook
Usage
from pydantic import SecretStr
from swarmauri_auth_idp_facebook import FacebookOAuth21Login
login = FacebookOAuth21Login(
client_id="1234567890",
client_secret=SecretStr("app-secret"),
redirect_uri="https://app.example.com/auth/callback",
state_secret=b"facebook-state-key",
)
print(login.client_id)
Workflow Summary
- Call
auth_url()and redirect the browser to the returned Facebook login URL. - Persist the
statetoken and validate it when handling the callback. - Exchange the authorization code via
exchange_and_identity()to obtain tokens and profile data. - Persist the returned identity details to drive session and authorization workflows.
Entry Points
swarmauri.auth_idp:FacebookOAuth20Loginswarmauri.auth_idp:FacebookOAuth21Loginswarmauri.auth_idp:FacebookOIDC10Login
Contributing
To contribute to swarmauri-sdk, review the guidelines for contributing which cover development workflow, testing, and coding standards.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swarmauri_auth_idp_facebook-0.2.0.dev5.tar.gz.
File metadata
- Download URL: swarmauri_auth_idp_facebook-0.2.0.dev5.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e57826ee2fc8b466d3e27ab8ec359facb38deb8ae97a6d6aebb822a3090aa9cd
|
|
| MD5 |
d3fab0ffa3cb786d9ecf3fb0589577f8
|
|
| BLAKE2b-256 |
b4f8eeb370ddf3a42413af7aee02b75f48ad78e81518a68ed1d5fb00797b6370
|
File details
Details for the file swarmauri_auth_idp_facebook-0.2.0.dev5-py3-none-any.whl.
File metadata
- Download URL: swarmauri_auth_idp_facebook-0.2.0.dev5-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbba5ed4b3808d10270722f4cd104ed9abd5ac2b4ddd710751afaa0f6aa26a02
|
|
| MD5 |
3931c43a826c8cbc8914a156a3fc4527
|
|
| BLAKE2b-256 |
4218e0e540009013b6e953e2a31cc859803c5bf3f464df122ef0be9b9c925379
|