When explaining the different atoms that can be passed to the on_mount
callback the first two options have the :
present, but :redirect_if_user_is_authenticated
is missing the :
.
With the different versions of the
on_mount
function
provided by the auth generator, we can execute code that adds the user to
the socket with:mount_current_user
, makes sure the user is authenticated
with:ensure_authenticated
, or perform a redirect usingredirect_if_user_is_authenticated
.