fastapi-jwt-auth icon indicating copy to clipboard operation
fastapi-jwt-auth copied to clipboard

Detail: Not found at request protected endpoint

Open Master-Y0da opened this issue 4 years ago • 1 comments

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": current_user}}, status_code=status.HTTP_200_OK)

And getting this response:

{ "detail": "Not Found" }

Why is that ? ....When I look into the browser request the authorization token is send without problems...Please help! , thanks for your time!

Master-Y0da avatar Jul 22 '21 14:07 Master-Y0da

Are you sure you accessing right endpoint? Please share your swagger or redoc page to see if routes appear.

markkkkas avatar Aug 07 '21 20:08 markkkkas