# `PhoenixKit.Utils.UserAgent`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v2.13.11/lib/phoenix_kit/utils/user_agent.ex#L1)

Deliberately small, allocation-light User-Agent sniffing.

Enough to make a device recognisable in UI/email copy ("Chrome on
macOS"), not a UA-parsing library. Shared by the QR login confirm
screen and the new-login security alert.

# `browser`

```elixir
@spec browser(String.t() | nil) :: String.t() | nil
```

Best-effort browser name from a raw User-Agent string.

Returns `nil` for `nil` input or an unrecognized string.

# `os`

```elixir
@spec os(String.t() | nil) :: String.t() | nil
```

Best-effort OS name from a raw User-Agent string.

Returns `nil` for `nil` input or an unrecognized string.

---

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