Skip to content

Apollo on AWS Lambda: Authentication & Authorization with JSON Web Tokens.

Notifications You must be signed in to change notification settings

jangerhofer/apolloLambdaJWT

Repository files navigation

JWT Serverless Apollo Test

Example of how to use JSON Web Tokens as an authentication mechanism in an Apollo GraphQL app.

Setting JWT Token Secret

Serverless will pull environment variables from a file called env.yml based on the "stage" you specify at deploy-time (defaults to dev). This file has been added to .gitignore such that the file isn't accidentally committed. In its most barebones form, env.yml looks like this:

dev:
  JWT_SECRET: Some...secret...here

N.B. You will need to adjust the endpointURL variable in the handler.js file if you deploy to a stage not named dev.

About

Apollo on AWS Lambda: Authentication & Authorization with JSON Web Tokens.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published