def success(conn, activity, user, _token) do
return_to = AuthRedirect.post_login_path(user)
message =
case activity do
{:confirm_new_user, :confirm} -> "Your email address has now been confirmed"
{:password, :reset} -> "Your password has successfully been reset"
_ -> "You are now signed in"
end
# This is a custom function that will return a %Scope{current_user: user} object
scope = Scope.for_user(user)
conn
|> delete_session(:return_to)
|> store_in_session(user)
# If your resource has a different name, update the assign name here (i.e :current_admin)
|> assign(:current_scope, scope) <--- This is what I'd like to do, the generated comment above makes it seem like this should be possible?
|> put_flash(:info, message)
|> redirect(to: return_to)
end
def success(conn, activity, user, _token) do
return_to = AuthRedirect.post_login_path(user)
message =
case activity do
{:confirm_new_user, :confirm} -> "Your email address has now been confirmed"
{:password, :reset} -> "Your password has successfully been reset"
_ -> "You are now signed in"
end
# This is a custom function that will return a %Scope{current_user: user} object
scope = Scope.for_user(user)
conn
|> delete_session(:return_to)
|> store_in_session(user)
# If your resource has a different name, update the assign name here (i.e :current_admin)
|> assign(:current_scope, scope) <--- This is what I'd like to do, the generated comment above makes it seem like this should be possible?
|> put_flash(:info, message)
|> redirect(to: return_to)
end