Wraps Assent.Strategy.Apple for Sigra OAuth integration.
Apple uses OIDC with private key authentication (D-18). Default scopes: name, email.
Important: Apple only returns the user's name on the first authorization (Pitfall 2
from RESEARCH.md). normalize_user/1 preserves nil name fields so downstream code
can detect and skip name updates on subsequent logins.
Summary
Functions
Generates the authorization URL for Apple OAuth.
Handles the OAuth callback from Apple.
Returns the default OAuth scopes for Apple.
Verifies that the Assent library is available.
Normalizes an Apple user info map to a consistent shape.
Functions
Generates the authorization URL for Apple OAuth.
Delegates to Assent.Strategy.Apple's authorize_url function with merged config.
Handles the OAuth callback from Apple.
Delegates to Assent.Strategy.Apple's callback function and normalizes the user info.
@spec default_scopes() :: [String.t()]
Returns the default OAuth scopes for Apple.
@spec ensure_assent!() :: :ok
Verifies that the Assent library is available.
Raises a descriptive error if Assent is not loaded (D-14).
Returns :ok if available.
Normalizes an Apple user info map to a consistent shape.
Preserves nil name when Apple does not return it (only sent on first auth).