This release is a pre-release and may not be stable for production use.
Swarmauri Auth IDP Apple
Apple Sign-In OAuth 2.0, OAuth 2.1, and OIDC 1.0 flows packaged for the Swarmauri ecosystem.
Features
- PKCE-enabled authorization code flows with signed state payloads to prevent tampering.
- Automatic OpenID Connect discovery and JWKS verification for ID token integrity.
- Reusable async HTTP client with retry and jitter to tolerate transient Apple API issues.
- Typed, ComponentBase-derived classes that register with Swarmauri plugin discovery.
- Explicit app-client stubs that document unsupported Apple client credentials grants.
Installation
pip
pip install swarmauri_auth_idp_apple
uv (project)
uv add swarmauri_auth_idp_apple
uv (environment)
uv pip install swarmauri_auth_idp_apple
Usage
The login classes expose the same asynchronous interface as the core IOAuth*Login
contracts. Instantiate them with your Apple developer credentials, persist the state
returned by auth_url, and provide it back during the exchange step.
from pydantic import SecretBytes
from swarmauri_auth_idp_apple import AppleOAuth21Login
login = AppleOAuth21Login(
team_id="ABCD123456",
key_id="XYZ7890",
client_id="com.example.web",
private_key_pem=SecretBytes(b"""-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"""),
redirect_uri="https://example.com/callback",
state_secret=SecretBytes(b"super-secret-state-key"),
)
# In your application, call `await login.auth_url()` to initiate the flow and
# `await login.exchange_and_identity(...)` inside an async context.
print(login.client_id)
Expected Workflow
- Call
auth_url()and redirect the user-agent to the returned URL. - Persist the
statefor later validation (cookie, session, encrypted store, etc.). - On the redirect back to your service, validate the returned
stateandcodeby callingexchange_and_identity()(orexchange()for the OIDC login). - Consume the normalized identity payload to provision sessions or tokens.
The package includes app-client classes which raise NotImplementedError to highlight
that Apple does not support generic client credential grants for Sign in with Apple.
Entry Points
The distribution registers the following entry points:
swarmauri.auth_idp:AppleOAuth20Loginswarmauri.auth_idp:AppleOAuth21Loginswarmauri.auth_idp:AppleOIDC10Loginswarmauri.auth_idp:AppleOAuth20AppClientswarmauri.auth_idp:AppleOAuth21AppClientswarmauri.auth_idp:AppleOIDC10AppClient
Contributing
To contribute to swarmauri-sdk, review the guidelines for contributing which cover development workflow, testing, and coding standards.
Metadata
Release files for swarmauri_auth_idp_apple 0.11.0.dev2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| swarmauri_auth_idp_apple-0.11.0.dev2.tar.gz | 11.4 kB | Without provenance | Details for swarmauri_auth_idp_apple-0.11.0.dev2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| swarmauri_auth_idp_apple-0.11.0.dev2-py3-none-any.whl | Python 3 | none | any | Details for swarmauri_auth_idp_apple-0.11.0.dev2-py3-none-any.whl |
Total release size: 27.2 kB
Release files / swarmauri_auth_idp_apple-0.11.0.dev2.tar.gz
| Download URL | swarmauri_auth_idp_apple-0.11.0.dev2.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b3429fe23cec0a2b65de32bdd2ca40c5b57060b00ec262a940538d0cc074bb9d
|
|
BLAKE2b-256 checksum How to use checksums |
fd28a7b4220d5288644e755163a77e16dd9b8fe6aaa7bfa55e72d74a046b7c46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / swarmauri_auth_idp_apple-0.11.0.dev2-py3-none-any.whl
| Download URL | swarmauri_auth_idp_apple-0.11.0.dev2-py3-none-any.whl |
|---|---|
| Size | 15.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d40f9ddeb5885d03dc827d0830d549563dd66bb46acfbe4a35890e8cdaaaeb45
|
|
BLAKE2b-256 checksum How to use checksums |
4e67a2cdfd5e979e03a3f59d73da7610cb0588e6bff57cdde810bad29bc595de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Security for swarmauri_auth_idp_apple 0.11.0.dev2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.