JWT and Go. How to integrate them with security requirements

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • axios

    Promise based HTTP client for the browser and node.js

  • In JavaScript, for example, it is convenient to implement such a mechanic in the axios library using interceptors.

  • golang-echo-boilerplate

    Golang API Starter Kit based by Echo

  • For example, take a boilerplate application written in the Golang Echo web framework. It has already implemented registration and user login, updating a pair of tokens using a refresh token, and there is a set of tests. Next, we will consistently change it to get the desired result. There is also Swagger documentation here, which is handy to use to test our changes. Updates made to the boilerplate application code are available in the repository under the "feature/JWT-logout" branch.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • jwt-go

    Discontinued ARCHIVE - Golang implementation of JSON Web Tokens (JWT). This project is now maintained at:

  • The boilerplate application uses the dgrijalva / jwt-go library to work with JWTs. Besides the standard set of claims fields, this library allows you to describe additional fields. In the application, this makes it possible to write to the token the ID of the user to whom it was issued. The library supports the NewWithClaims () and Parse () functions used in the AuthHandler application to create and validate tokens. Also, the Echo framework has a JWT middleware that uses the specified library to validate tokens. This middleware is hooked up in the ConfigureRoutes () function of the template application that declares the routing.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts