View Source PowAssent.Phoenix.ViewHelpers (PowAssent v0.4.13)
View helpers to render authorization links.
Link to this section Summary
Functions
Generates an authorization link for a provider.
Generates a provider deauthorization link.
Generates list of authorization links for all configured providers.
Link to this section Functions
Specs
authorization_link(Conn.t(), atom(), keyword()) :: Phoenix.HTML.safe()
Generates an authorization link for a provider.
The link is used to sign up or register a user using a provider. If
:invited_user
is assigned to the conn, the invitation token will be passed
on through the URL query params.
Specs
deauthorization_link(Conn.t(), atom(), keyword()) :: Phoenix.HTML.safe()
Generates a provider deauthorization link.
The link is used to remove authorization with the provider.
Specs
provider_links(Conn.t(), keyword()) :: [Phoenix.HTML.safe()]
Generates list of authorization links for all configured providers.
The list of providers will be fetched from the PowAssent configuration, and
authorization_link/2
will be called on each.
If a user is assigned to the conn, the authorized providers for a user will
be looked up with PowAssent.Plug.providers_for_current_user/1
.
deauthorization_link/2
will be used for any already authorized providers.