PHPackages                             dimkinthepro/jwt-auth-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. dimkinthepro/jwt-auth-bundle

ActiveSymfony-bundle[Authentication &amp; Authorization](/categories/authentication)

dimkinthepro/jwt-auth-bundle
============================

This bundle provides JWT authentication

1.0.0(1y ago)041MITPHPPHP &gt;=8.1

Since Sep 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/dimkinthepro/jwt-auth-bundle)[ Packagist](https://packagist.org/packages/dimkinthepro/jwt-auth-bundle)[ Docs](https://github.com/dimkinthepro/jwt-auth-bundle)[ RSS](/packages/dimkinthepro-jwt-auth-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (20)Versions (2)Used By (0)

JWT authentication bundle for Symfony
=====================================

[](#jwt-authentication-bundle-for-symfony)

### 1. Installation:

[](#1-installation)

```
composer require dimkinthepro/jwt-auth-bundle
```

### 2. Check bundles config:

[](#2-check-bundles-config)

```
# config/bundles.php

return [
#...
    Dimkinthepro\JwtAuth\DimkintheproJwtAuthBundle::class => ['all' => true],
];
```

### 3. Create bundle configuration:

[](#3-create-bundle-configuration)

```
# config/packages/dimkinthepro_jwt_auth.yaml
dimkinthepro_jwt_auth:
    public_key_path: '%kernel.project_dir%/var/dimkinthepro/jwt-auth-bundle/public.pem'
    private_key_path: '%kernel.project_dir%/var/dimkinthepro/jwt-auth-bundle/private.pem'
    passphrase: 'SomeRandomPassPhrase'
    token_ttl: 36000 # 10 hour
    algorithm: 'RS512'
    refresh_token_ttl: 2592000 # 1 month
    refresh_token_length: 128 # max=255
```

### 4. Add security configuration

[](#4-add-security-configuration)

```
# config/packages/security.yaml

security:
  #...
  main:
      lazy: true
      auth_jwt: ~
      pattern: ^/api/
      stateless: true
      provider: your_app_user_provider
      json_login:
          check_path: /api/user/login
          username_path: email
          success_handler: Dimkinthepro\JwtAuth\Infrastructure\Security\SuccessAuthenticationHandler
          failure_handler: Dimkinthepro\JwtAuth\Infrastructure\Security\FailAuthenticationHandler
```

### 5. Add doctrine configuration

[](#5-add-doctrine-configuration)

```
# config/packages/doctrine.yaml
doctrine:
    #...
    orm:
        #...
        mappings:
            #...
            DimkintheproJwtAuthBundle:
                is_bundle: true
                type: xml
                prefix: Dimkinthepro\JwtAuth\Domain\Entity
```

### 6. Add Routes

[](#6-add-routes)

```
# config/routes.yaml
api_login:
  path: /api/login
  methods: [POST]

api_token_refresh:
  path: /api/token-refresh
  controller: Dimkinthepro\JwtAuth\Infrastructure\Controller\TokenRefreshAction
  methods: [POST]
```

### 7. Generate migrations:

[](#7-generate-migrations)

```
php bin/console doctrine:migrations:diff

php bin/console doctrine:migrations:migrate
```

### 8. Generate key pair:

[](#8-generate-key-pair)

```
php bin/console dimkinthepro:jwt-auth:generate-key-pair
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

669d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8753e58b7caa98494a6c70f4870cb382ec93566e7839def58e8c050624e398dd?d=identicon)[dimkin.the.pro](/maintainers/dimkin.the.pro)

---

Top Contributors

[![dimkinthepro](https://avatars.githubusercontent.com/u/104203723?v=4)](https://github.com/dimkinthepro "dimkinthepro (1 commits)")

---

Tags

jwtjwt-authjwt-authenticationjwt-tokenphp81symfony-bundlejwtsymfonybundle

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/dimkinthepro-jwt-auth-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/dimkinthepro-jwt-auth-bundle/health.svg)](https://phpackages.com/packages/dimkinthepro-jwt-auth-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M386](/packages/easycorp-easyadmin-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k17.8k](/packages/prestashop-prestashop)[chameleon-system/chameleon-base

The Chameleon System core.

1028.6k5](/packages/chameleon-system-chameleon-base)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
