IndominusByte / fastapi-jwt-auth

FastAPI extension that provides JWT Auth support (secure, easy to use, and lightweight)
http://indominusbyte.github.io/fastapi-jwt-auth/
MIT License
660 stars 153 forks source link

`authjwt_secret_key` must be set when using symmetric algorithm HS256 #76

Closed zahid-arbisoft closed 2 years ago

zahid-arbisoft commented 2 years ago

What does this error mean? authjwt_secret_key must be set when using symmetric algorithm HS256

rhatch-kw commented 2 years ago

The intent behind this message is to indicate that the default signing algorithm HS256 requires that a shared secret be set to create tokens or verify signatures.

This document describes how to configure a Settings model that is used to set the config attributes used by fastapi_jwt_auth module, including authjwt_secret_key.

It might look something like this:

class Settings(BaseModel):
    authjwt_algorithm: str = "HS256"
    authjwt_secret_key: str = "my-dev-secret"