Assent.Strategy.Twitch (Assent v0.4.0)

Copy Markdown View Source

Twitch OpenID Connect strategy.

See Assent.Strategy.OIDC for more.

Summary

Functions

Generates an OpenID Connect authorization URL.

Handles an OpenID Connect callback.

Fetches user data from an ID Token or the UserInfo endpoint.

Returns user claims without provider-specific normalization.

Functions

authorize_url(config)

@spec authorize_url(Keyword.t()) :: Assent.Strategy.OIDC.on_authorize_url()

Generates an OpenID Connect authorization URL.

callback(config, params)

@spec callback(Keyword.t(), map()) :: Assent.Strategy.OIDC.on_callback()

Handles an OpenID Connect callback.

fetch_user(config, token)

@spec fetch_user(Keyword.t(), map()) :: {:ok, map()} | {:error, term()}

Fetches user data from an ID Token or the UserInfo endpoint.

normalize(config, user)

Returns user claims without provider-specific normalization.