Generic fallback strategy wrapper for any Assent strategy (D-13).
Delegates to the Assent strategy module specified via the :strategy key
in the provider config. This allows any Assent-supported provider to work
with Sigra without a dedicated wrapper.
Example
# In config.exs:
config :my_app, Sigra,
oauth: [
providers: [
discord: [
strategy: Assent.Strategy.Discord,
client_id: "...",
client_secret: "..."
]
]
]
Summary
Functions
Generates the authorization URL using the configured Assent strategy.
Handles the OAuth callback using the configured Assent strategy.
Verifies that the Assent library is available.
Normalizes a generic provider user info map to a consistent shape.
Functions
Generates the authorization URL using the configured Assent strategy.
Requires :strategy key in config pointing to an Assent strategy module.
Handles the OAuth callback using the configured Assent strategy.
Requires :strategy key in config pointing to an Assent strategy module.
@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 a generic provider user info map to a consistent shape.