fastapi-jwt-auth
fastapi-jwt-auth copied to clipboard
FastAPI extension that provides JWT Auth support (secure, easy to use, and lightweight)
I saw that the basic usage is sending the refresh_token on the Header and validating it with Authorize.jwt_refresh_token_required() Isn't it a best practice to send refresh_token on the Body? Would...
I'm trying to send a request to the user example endpoint described in docs (I made some edits): @router.get('/users/me') def user(Authorize: AuthJWT = Depends()): Authorize.jwt_required() current_user = Authorize.get_jwt_subject() return JSONResponse({"response":{"user":...
https://kit.svelte.dev/ I expect there is a similar jwt authentication module for sveltekit
Hello, i was looking at Basic Usage example, and saw, that AuthJWT uses inherited from AuthConfig decorator to set it's static variables. However, [this](https://github.com/IndominusByte/fastapi-jwt-auth/blob/a6c06193319da0e4976c7472966f3a2891e0d50c/fastapi_jwt_auth/auth_config.py#L56) decorator does not return anything, so...
I am seeing a 500 error when passing a wrong token instead of the usual 422. This happens with every version above 0.2.0. Very basic example: ```python @auth_api_router_v1_0.get('/verify', status_code=status.HTTP_200_OK) async...
Hello, I am looking at migrating a Flask App (using to JWT Extended) tp FastApi and I could not find an equivalent to overwrite the key that is used. I...
Hi, I'm receiving the error : AttributeError: 'Depends' object has no attribute 'create_access_token' my code is as follows: def Authenticate_user(request: authSchema.loginSchema, Authorize: AuthJWT=Depends()): try: user = db.users.find_one({"email": request.email}) print(user["_id"]) print(request.password)...
we have a secret key that is in bytes (not utf-8 unfortunately). PyJWT does this.. ``` def force_bytes(value): if isinstance(value, text_type): return value.encode('utf-8') elif isinstance(value, binary_type): return value else: raise...
I am trying to use credentials from a Basic Auth form to be passed into a script to generate a JWT. However when I call the endpoint I get: >...