View Source AshAuthentication.Phoenix.Components.Helpers (ash_authentication_phoenix v1.1.0)

Helpers which are commonly needed inside the various components.

Link to this section Summary

Functions

The LiveView Socket contains a reference to the Phoenix endpoint, and from there we can extract the otp_app of the current request.

The LiveView Socket contains a refererence to the Phoenix router, and from there we can generate the name of the route helpers module.

Link to this section Functions

Link to this function

otp_app_from_socket(socket)

View Source
@spec otp_app_from_socket(Phoenix.LiveView.Socket.t()) :: atom()

The LiveView Socket contains a reference to the Phoenix endpoint, and from there we can extract the otp_app of the current request.

@spec route_helpers(Phoenix.LiveView.Socket.t()) :: module()

The LiveView Socket contains a refererence to the Phoenix router, and from there we can generate the name of the route helpers module.