PowAssent v0.4.6 PowAssent.Phoenix.ViewHelpers View Source
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
authorization_link(conn, provider, opts \\ [])
View Sourceauthorization_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.
deauthorization_link(conn, provider, opts \\ [])
View Sourcedeauthorization_link(Conn.t(), atom(), keyword()) :: Phoenix.HTML.safe()
Generates a provider deauthorization link.
The link is used to remove authorization with the provider.
provider_links(conn, link_opts \\ [])
View Sourceprovider_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.