defmodule PhoenixKitWeb.TestEnsureAuthLive do @moduledoc """ Test component for phoenix_kit_ensure_authenticated authentication level. This page requires authentication and redirects to login if not authenticated. """ use PhoenixKitWeb, :live_view alias PhoenixKit.Users.Auth.Scope def render(assigns) do ~H"""
This page uses PhoenixKit phoenix_kit_ensure_authenticated.
User must be authenticated to access this page.
Email: {Scope.user_email(@phoenix_kit_current_scope)}
ID: {Scope.user_id(@phoenix_kit_current_scope)}
<%= if Scope.user(@phoenix_kit_current_scope).confirmed_at do %>Status: Confirmed at {Scope.user(@phoenix_kit_current_scope).confirmed_at}
<% else %>Status: Not confirmed
<% end %>