PHPackages                             gesdinet/jwt-refresh-token-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. gesdinet/jwt-refresh-token-bundle

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

gesdinet/jwt-refresh-token-bundle
=================================

Implements a refresh token system over Json Web Tokens in Symfony

v2.0.0(4mo ago)70516.4M—0.5%178[69 issues](https://github.com/markitosgv/JWTRefreshTokenBundle/issues)[3 PRs](https://github.com/markitosgv/JWTRefreshTokenBundle/pulls)20MITPHPPHP &gt;=8.2 || ^8.3 || ^8.4CI passing

Since Oct 1Pushed 2mo ago11 watchersCompare

[ Source](https://github.com/markitosgv/JWTRefreshTokenBundle)[ Packagist](https://packagist.org/packages/gesdinet/jwt-refresh-token-bundle)[ RSS](/packages/gesdinet-jwt-refresh-token-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (47)Versions (58)Used By (20)

JWTRefreshTokenBundle
=====================

[](#jwtrefreshtokenbundle)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/af297cd1c92b280f43a6deb0707ce498c00c13cffead1026be62400518767a99/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d61726b69746f7367762f4a575452656672657368546f6b656e42756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/markitosgv/JWTRefreshTokenBundle/?branch=master)[![Run Tests](https://github.com/markitosgv/JWTRefreshTokenBundle/workflows/Run%20Tests/badge.svg?branch=master)](https://github.com/markitosgv/JWTRefreshTokenBundle/actions)[![Code Coverage](https://camo.githubusercontent.com/5bcf11d5ea2a0ea708ce4c01efbe6455b3120f61dc577322228b0d7168f471e9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d61726b69746f7367762f4a575452656672657368546f6b656e42756e646c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/markitosgv/JWTRefreshTokenBundle/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/8a8a4538ba08b1301fbb9710f14dc3008205b75fd0aee8017ee8ec9dc90fb5a0/68747470733a2f2f706f7365722e707567782e6f72672f67657364696e65742f6a77742d726566726573682d746f6b656e2d62756e646c652f762f737461626c65)](https://packagist.org/packages/gesdinet/jwt-refresh-token-bundle)[![Total Downloads](https://camo.githubusercontent.com/77647ea99438b58295e9d9c2b1002c9ff583eeb743d8b830a71e75b36d31521a/68747470733a2f2f706f7365722e707567782e6f72672f67657364696e65742f6a77742d726566726573682d746f6b656e2d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/gesdinet/jwt-refresh-token-bundle)[![License](https://camo.githubusercontent.com/070343bc6ca48b3a9d5cab5a8c3b98b6d178fa114db458dd286dca59884c0d73/68747470733a2f2f706f7365722e707567782e6f72672f67657364696e65742f6a77742d726566726573682d746f6b656e2d62756e646c652f6c6963656e7365)](https://packagist.org/packages/gesdinet/jwt-refresh-token-bundle)[![PHPStan](https://camo.githubusercontent.com/8200e616fde4404cb348e95bb987c65291059e5f89521837e88fc4436073298c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d627269676874677265656e2e737667)](https://phpstan.org/)[![Rector](https://camo.githubusercontent.com/a872e9910bc6bf5074012f3e0b1d093e974f4d480352d821b043ebd41bd0acd8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f526563746f722d656e61626c65642d627269676874677265656e2e737667)](https://getrector.org/)The purpose of this bundle is manage refresh tokens with JWT (Json Web Tokens) in an easy way. This bundles uses [LexikJWTAuthenticationBundle](https://github.com/lexik/LexikJWTAuthenticationBundle). Supports Doctrine ORM/ODM.

Prerequisites
-------------

[](#prerequisites)

This bundle requires PHP 8.2 or later and Symfony 6.4, 7.2+ or 8.0+. For support with older Symfony versions, please use the 1.x release. **Protip:** Though the bundle doesn't force you to do so, it is highly recommended to use HTTPS.

Installation
------------

[](#installation)

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

**You must also install either the Doctrine ORM or MongoDB ODM, these packages are not installed automatically with this bundle. Failing to do so may trigger errors on installation.**With Doctrine's ORM

```
composer require doctrine/orm doctrine/doctrine-bundle gesdinet/jwt-refresh-token-bundle
```

With Doctrine's MongoDB ODM

```
composer require doctrine/mongodb-odm doctrine/mongodb-odm-bundle gesdinet/jwt-refresh-token-bundle
```

Alternatively, a custom persistence layer can be used. For that purpose, you must:

- provide an implementation of `Doctrine\Persistence\ObjectManager`
- configure the bundle to [use your object manager](#use-another-object-manager)

### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

#### For Symfony Flex Applications

[](#for-symfony-flex-applications)

For an application using Symfony Flex the bundle should be automatically registered, but if not you will need to add it to your `config/bundles.php` file.

```
