# hapi-auth-jwt2-cookie-example
**Repository Path**: mirrors_dwyl/hapi-auth-jwt2-cookie-example
## Basic Information
- **Project Name**: hapi-auth-jwt2-cookie-example
- **Description**: :lock: Example Hapi.js app using hapi-auth-jwt2 with Cookies & Redis (hosted on Heroku) with tests!
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-08-08
- **Last Updated**: 2026-01-24
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# hapi-auth-jwt2 *example*
A ***functional example*** Hapi.js app demonstrating
[***hapi-auth-jwt2***](https://github.com/dwyl/hapi-auth-jwt2) authentication
using cookies for client-side session storage and **Redis** (hosted on Heroku) for session validation with ***tests***!
[](https://travis-ci.org/dwyl/hapi-auth-jwt2-cookie-example)
[](https://codeclimate.com/github/dwyl/hapi-auth-jwt2-cookie-example/coverage)
[](https://codeclimate.com/github/dwyl/hapi-auth-jwt2-cookie-example)
[](https://david-dm.org/dwyl/hapi-auth-jwt2-cookie-example)
[](https://www.bithound.io/github/dwyl/hapi-auth-jwt2-cookie-example)
[](http://nodejs.org/download/)
[](https://npmjs.org/package/hapi-auth-jwt2)
[](http://hapijs.com)
[](https://david-dm.org/dwyl/hapi-auth-jwt2-cookie-example#info=devDependencies)
## Environment Variables
To run this you will need to add an environment variable for your **JWT_SECRET** and **REDISCLOUD_URL**:
```
export JWT_SECRET=ItsNoSecretBecauseYouToldEverybody
export REDISCLOUD_URL=redis://rediscloud:OhEJvSgna@pub-redis-10689.eu-west-1-2.1.ec2.garantidata.com:10689
```
> If you are new to using environment variables
please see: https://github.com/dwyl/learn-environment-variables
**Note**: you will need to set up your own Redis to use the code in this example in your project. if you're new to Redis check out our quick start guide: https://github.com/dwyl/learn-redis
If you have ***any questions***, please ask! [](https://gitter.im/dwyl/chat/?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) we are here to help!
## Need Help? Got Questions?
> If you have questions or need _any_ help please post an issue: https://github.com/dwyl/hapi-auth-jwt2-cookie-example/issues