# Tokens: Signing In with a JWT

After a sign-in, an API hands out a JWT, a signed token in three parts that PyJWT makes with jwt.encode and an exp claim and checks with jwt.decode, at POST /auth/token with the OAuth2 password form so the docs page's Authorize button works, and the caller sends it back in an Authorization header with every request.

![Cheat sheet: Tokens: Signing In with a JWT](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/7c7ccb20603f4981ae47a88045724fca.webp)

- Category: FastAPI
- Level: Journeyman
- Tags: Base64url, Bearer Token, Claim, fastapi, JWT, OAuth2 Password Flow, rest-api, Token Signature
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/fastapi-auth-tokens-jwt-cheat-sheet
