PHPackages                             elementworks/jwt-tokens - 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. elementworks/jwt-tokens

ActiveCraft-plugin[Authentication &amp; Authorization](/categories/authentication)

elementworks/jwt-tokens
=======================

Create JWT tokens

1.0.4(2y ago)010proprietaryPHP

Since Apr 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/elementworks/jwttokens)[ Packagist](https://packagist.org/packages/elementworks/jwt-tokens)[ RSS](/packages/elementworks-jwt-tokens/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (6)Used By (0)

JWT Tokens plugin for Craft CMS 3.x
===================================

[](#jwt-tokens-plugin-for-craft-cms-3x)

Create JWT Tokens in Twig.

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 3.0.0-beta.23 or later.

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

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require elementworks/jwt-tokens

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for JWT Tokens.

Settings
--------

[](#settings)

The only setting is a signing secret. It is recommended to set this using an [environment variable](https://docs.craftcms.com/v3/config/environments.html).

How to create a JWT Token
-------------------------

[](#how-to-create-a-jwt-token)

First, create a payload as a Twig hash (associative array).

Next, pass this into the Twig function, along with the algorithm (e.g. `'HS256'`) to create the token:

```
{% set payload = {
   'name': 'John Doe',
   'company': 'Google',
} %}

{% set token = craft.jwtTokens.createToken(payload, 'HS256') %}
```

Brought to you by [Steve Rowling](https://springworks.co.uk)

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Every ~0 days

Total

5

Last Release

821d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/74006400?v=4)[Element Works Ltd](/maintainers/elementworks)[@elementworks](https://github.com/elementworks)

---

Top Contributors

[![steverowling](https://avatars.githubusercontent.com/u/4478560?v=4)](https://github.com/steverowling "steverowling (5 commits)")

---

Tags

cmsCraftcraftcmscraft-pluginjwt tokens

### Embed Badge

![Health badge](/badges/elementworks-jwt-tokens/health.svg)

```
[![Health](https://phpackages.com/badges/elementworks-jwt-tokens/health.svg)](https://phpackages.com/packages/elementworks-jwt-tokens)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k60](/packages/verbb-formie)[verbb/vizy

A flexible visual editor field for Craft.

4250.4k](/packages/verbb-vizy)[verbb/hyper

A user-friendly links field for Craft.

24147.8k12](/packages/verbb-hyper)[verbb/knock-knock

Password protect your public facing Craft website with a single password.

17124.9k9](/packages/verbb-knock-knock)[verbb/events

A full-featured plugin for event management and ticketing.

2311.9k](/packages/verbb-events)[jamesedmonston/graphql-authentication

GraphQL authentication for your headless Craft CMS applications.

2917.5k](/packages/jamesedmonston-graphql-authentication)

PHPackages © 2026

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