# `SquatchMail.Web.OnMount`
[🔗](https://github.com/Axio-Intelligence/Squatch-Mail/blob/v0.1.0/lib/squatch_mail/web/on_mount.ex#L1)

The default `on_mount` hook and `live_session` session builder for the
SquatchMail dashboard.

Access control is fully handled ahead of `live_session` by
`SquatchMail.Web.Plugs.Auth` (see `SquatchMail.Web.Router` for why it can't
live here); this module is strictly post-auth. It assigns the dashboard's
base path so layout components (nav links, asset URLs) can build paths
relative to wherever the host mounted `squatch_mail_dashboard`. It is
always appended last to the `on_mount` list so host hooks configured via
`squatch_mail_dashboard(path, on_mount: [...])` run first.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
