JWTs Authentication with Go, echo, and GraphQL
A simple tutorial of JWT authentication using Go, echo, and GraphQL
3 min readDec 14, 2019
I’ve introduced how to build Go API with GraphQL in the previous post. This post will highlight an authentication of GraphQL API.
Example Repo
Here is a link to the codebase in full for reference:
Pre-requisites
To quickly start off, you can set up GraphQL API by following the post:
In case you are not familiar with JWTs, you can check the introduction before starting.
Dependencies
jwt-go
allow us to use JWTs in Go. Then install:
go get github.com/dgrijalva/jwt-go