---
title: "João Pinheiro (@jpinheiro) | Hashnode"
description: "João Pinheiro (@jpinheiro) writes on Hashnode. Read their latest articles and follow their work."
url: "https://hashnode.com/@jpinheiro"
---

@jpinheiro

# João Pinheiro

@jpinheiro · Joined July 2025

## Comments

[This tutorial has glaring, obvious security issues, namely: tokens should never be passed as cookies, use Authorization header instead; the ParseToken() implementation is not validating if the token is using a valid/secure encryption algorithm ('none' is a valid JWT algorithm); logging out is just deleting the cookie; As such the token is still valid until it expires. You need to maintain a revocation list for "logged-out" tokens, preferably by user; while the example uses a low TTL for the token (5 min), it offers no insight on how to perform token refresh; on actual "secure" implementations, one should also keep track of the source profile of the connection (eg. ip, browser, etc) to detect misuse of the token. Long story short, for many applications, JWT is actually a terrible option - complex to implement properly, complex to scale, and still requires user resolution/lookup when additional info (like acls, contact info, etc) is required.](https://hashnode.com/posts/how-to-implement-authentication-and-authorization-in-golang/63decbedf0bf6bdfd346f58e/comment/6877e87364a6c36dd85fa327)

Comment · Article · Jul 16, 2025 · [How to Implement Authentication and Authorization in Golang.](https://hashnode.com/posts/how-to-implement-authentication-and-authorization-in-golang/63decbedf0bf6bdfd346f58e)
