Skip to content

angee.integrate.connect

OAuth account-connect completion: link an external account and store its credential.

The connect counterpart to OIDC login. It authenticates out to a provider on behalf of the already-signed-in user, labels their ExternalAccount from the userinfo profile, and stores the OAuth Credential the integration runtime acts with. No ID token, no user resolution, no session — that is login, and lives in iam_integrate_oidc. Works for any OAuthClient (an OIDC refinement is not required).

AccountConnectCompletion

python
@dataclass(frozen=True, slots=True)
class AccountConnectCompletion()

Connected account, captured credential, and provider profile claims.

enabled_oauth_client_from_hint

python
def enabled_oauth_client_from_hint(hint: Any,
                                   *,
                                   owner_label: str,
                                   reason: str,
                                   vendor_slug: str = "") -> Any

Resolve an enabled OAuth client from a backend-declared client hint.

complete_account_connect

python
def complete_account_connect(oauth_client: Any, *, code: str, state_token: str,
                             redirect_uri: str) -> AccountConnectCompletion

Complete an authenticated OAuth account-connect redirect.

The connecting user is the one captured in state when the flow started; the account is labelled from the provider userinfo and its OAuth credential stored under (user, provider).

Released under the AGPL-3.0 License.