0PricingLogin
Flask Academy · Lesson

Issue Access Tokens on Login

Sign a JWT and return it to the client.

The Login Handshake

Login is a trade: the client sends valid credentials, and your server hands back a signed access token it can use on every later call.

Install the Extension

The Flask-JWT-Extended library does the signing and checking for you. One pip install and you are ready to mint tokens.

pip install flask-jwt-extended

All lessons in this course

  1. Sessions vs Stateless Tokens
  2. Issue Access Tokens on Login
  3. Protect Endpoints with jwt_required
  4. Refresh Tokens and Expiry
← Back to Flask Academy