# Guardian

> A token based authentication library for Elixir applications

Source: https://talira.ai/catalog/guardian-4k5fder3
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [security / auth / libraries](https://talira.ai/categories/security/auth/libraries), [languages / elixir](https://talira.ai/categories/languages/elixir)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source (MIT).
- Free tier: yes[^1]
- Supports: [JWT](https://talira.ai/standards/jwt.md)[^2]
- Backed by: [Ueberauth](https://talira.ai/orgs/ueberauth.md)

Guardian is a token based authentication library for Elixir. It supports JSON Web Tokens out of the box and any other token type that implements its `Guardian.Token` behaviour, and authenticates web endpoints through [Plug](https://talira.ai/catalog/plug-em53kn6h.md) and [Phoenix](https://talira.ai/catalog/phoenix-pr0aa2gd.md), Phoenix channels and sockets, or anything else that can carry a token. An application can configure several token types, each with its own claims.

## Links

- GitHub: https://github.com/ueberauth/guardian
- Docs: https://hexdocs.pm/guardian/

## Problems it solves

- add token based login to my Phoenix API
- authenticate Phoenix channel connections with a signed token
- issue and verify JWTs for users in my Elixir app
- protect some routes in my Elixir web app so only signed-in users reach them

## Features

- JSON Web Tokens by default, other token types through a behaviour
- Plug pipelines for Phoenix and other web apps
- authentication for Phoenix channels and sockets
- several token types and configurations in one application
- custom claims in tokens

## Trust

Overall: 0.48 out of 1.
Signals: maintenance 0.45, adoption 0.71, momentum 0.43, community 0.90, backing 0.30, extensibility 0.00.

- last commit 3 months ago
- latest release v2.5.0 3 months ago
- 3.5k GitHub stars
- 177 contributors
- backed by Ueberauth

## Related

- Works with [Plug](https://talira.ai/catalog/plug-em53kn6h.md)
- Works with [Phoenix](https://talira.ai/catalog/phoenix-pr0aa2gd.md)

## Alternatives

- [Joken](https://talira.ai/catalog/joken-9mkbyp66.md): JSON Web Token (JWT) library for Elixir
- [JOSE (Erlang and Elixir)](https://talira.ai/catalog/jose-erlang-and-elixir-5s8409fh.md): JSON Object Signing and Encryption for Erlang and Elixir
- [OAuth2 (Elixir)](https://talira.ai/catalog/oauth2-elixir-6p5evwcq.md): An Elixir OAuth 2.0 client library

## Sources

[^1]: https://github.com/ueberauth/guardian/blob/master/LICENSE (checked 28 Nov 2026)
[^2]: https://github.com/ueberauth/guardian (checked 28 Nov 2026)
