Skip to main content

Facebook OAuth 2.0 / OAuth 2.1 / OIDC 1.0 login implementations for Swarmauri

Project description

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_auth_idp_facebook Discord

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 /me or verified ID tokens.
  • Built-in retrying HTTP client tuned for Facebook authorization and Graph endpoints.
  • ComponentBase-compatible models registering under swarmauri.auth_idp entry 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

  1. Call auth_url() and redirect the browser to the returned Facebook login URL.
  2. Persist the state token and validate it when handling the callback.
  3. Exchange the authorization code via exchange_and_identity() to obtain tokens and profile data.
  4. Persist the returned identity details to drive session and authorization workflows.

Entry Points

  • swarmauri.auth_idp:FacebookOAuth20Login
  • swarmauri.auth_idp:FacebookOAuth21Login
  • swarmauri.auth_idp:FacebookOIDC10Login

Contributing

To contribute to swarmauri-sdk, review the guidelines for contributing which cover development workflow, testing, and coding standards.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swarmauri_auth_idp_facebook-0.11.0.dev1.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file swarmauri_auth_idp_facebook-0.11.0.dev1.tar.gz.

File metadata

  • Download URL: swarmauri_auth_idp_facebook-0.11.0.dev1.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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

Hashes for swarmauri_auth_idp_facebook-0.11.0.dev1.tar.gz
Algorithm Hash digest
SHA256 e427868413fbeaea98ae4f563db0d72874fadb9f38e786aa4c2663c34549fc13
MD5 97c167079b8cd38fd12691f66ad76679
BLAKE2b-256 386ce67e4615463e0169e6c0c0b78b22ed1d531ad4285794deeaf34a5b5022f6

See more details on using hashes here.

File details

Details for the file swarmauri_auth_idp_facebook-0.11.0.dev1-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_auth_idp_facebook-0.11.0.dev1-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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

Hashes for swarmauri_auth_idp_facebook-0.11.0.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 167c8e62045c47933fc26fa047a9dd0133a3ff3e8b62dab87822f55afebb8052
MD5 e2decc64339c69873782fef45bc560d8
BLAKE2b-256 be942e918f4765d0ecd7470b43f65b3d9dfa85bf263beeb22d48c42e32dc87b1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page