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

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

janakdom/jwt-refresh-token-bundle
=================================

Implements a refresh token system over Json Web Tokens in Symfony

v0.9.5(5y ago)01.1k[1 PRs](https://github.com/janakdom/JWTRefreshTokenBundle/pulls)MITPHPPHP ^5.5.9|&gt;=7.0.8

Since Oct 1Pushed 2y agoCompare

[ Source](https://github.com/janakdom/JWTRefreshTokenBundle)[ Packagist](https://packagist.org/packages/janakdom/jwt-refresh-token-bundle)[ RSS](/packages/janakdom-jwt-refresh-token-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (7)Versions (41)Used By (0)

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

[](#jwtrefreshtokenbundle)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/00bd6e94145f8135b7b413620d4f8c9a72959d7933a2232dd542c8ce6537e28b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f67657364696e65742f4a575452656672657368546f6b656e42756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/gesdinet/JWTRefreshTokenBundle/?branch=master)[![Build Status](https://camo.githubusercontent.com/8af32d19e8d045b40ac981901ec0efde66214e0d5749fadb03059aa3844feb06/68747470733a2f2f7472617669732d63692e6f72672f6d61726b69746f7367762f4a575452656672657368546f6b656e42756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/markitosgv/JWTRefreshTokenBundle)[![Code Coverage](https://camo.githubusercontent.com/00a8458ddc6ffc66a1a5f3d111ef1133fdbfa1879520561225af769b85d0ddc6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f67657364696e65742f4a575452656672657368546f6b656e42756e646c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/gesdinet/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)[![StyleCI](https://camo.githubusercontent.com/e79902a9555960098efda7871cdfc7a7b1969ae4799912adebfc2de3d3b6a72a/68747470733a2f2f7374796c6563692e696f2f7265706f732f34323538323139392f736869656c64)](https://styleci.io/repos/42582199)

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 Symfony 3.4+, 4.0+ or 5.0+.

If you want to use this bundle with previous Symfony versions, please use 0.2.x releases.

**Protip:** Though the bundle doesn't enforce you to do so, it is highly recommended to use HTTPS.

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

[](#installation)

### Step 1: Download the Bundle

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

**It's important you manually require either Doctrine's ORM or MongoDB ODM as well, these packages are not required automatically now as you can choose between them. 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-bundle" "gesdinet/jwt-refresh-token-bundle"
```

or edit composer.json:

```
// ...
"gesdinet/jwt-refresh-token-bundle": "~0.1",
"doctrine/orm": "^2.4.8",
"doctrine/doctrine-bundle": "~1.4",
"doctrine/mongodb-odm-bundle": "^3.4"
// ...

```

### Step 2: Enable the Bundle

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

**Symfony 3 Version:**
Register bundle into `app/AppKernel.php`:

```
