Code Monkey home page Code Monkey logo

flask-jwt-auth's Issues

Requirements file

Hi,
Thanks for the great input. I think your requirements file is containing a little to much. Do you have the correct dependancy list?

Kr
Mads

No module named 'flask_jwt_extended'

hello sir, im much thankful with your application that really helps me. there was no error after i used your configuration in my virtual environment which mean in localhost. But when I configured it through uwgi using the AWS server (amazon), there was an error says No module named 'flask_jwt_extended'. Could you help me sir regarding with this issue? :) I already asked it in stackoverflow and it seems they're dont have an idea how to solve it thanks. the logs are here in this link https://stackoverflow.com/questions/50786201/importerror-no-module-named-flask-jwt-extended-in-python-flask
more powers to you :)

Some methods are deprecated

Hi Oleg.
I cloned the repository and found that some methods are deprecated and if I try to change their names to what's suggested by "flask_jwt_extended", it would break more things.. I think the code needs a test and update since it was based on older Python modules. Here's an example of errors I'm getting right now:

(venv) d806848@nebula-03:~/flask-jwt-auth$ FLASK_APP=run.py FLASK_DEBUG=1 flask run --host=0.0.0.0

  • Serving Flask app 'run.py' (lazy loading)
  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: on
    Traceback (most recent call last):
    File "/home/d806848/flask-jwt-auth/venv/bin/flask", line 8, in
    sys.exit(main())
    File "/home/d806848/flask-jwt-auth/venv/lib/python3.6/site-packages/flask/cli.py", line 994, in main
    cli.main(args=sys.argv[1:])
    File "/home/d806848/flask-jwt-auth/venv/lib/python3.6/site-packages/flask/cli.py", line 600, in main
    return super().main(*args, **kwargs)
    File "/home/d806848/flask-jwt-auth/venv/lib/python3.6/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
    File "/home/d806848/flask-jwt-auth/venv/lib/python3.6/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/home/d806848/flask-jwt-auth/venv/lib/python3.6/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File "/home/d806848/flask-jwt-auth/venv/lib/python3.6/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
    File "/home/d806848/flask-jwt-auth/venv/lib/python3.6/site-packages/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
    File "/home/d806848/flask-jwt-auth/venv/lib/python3.6/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
    File "/home/d806848/flask-jwt-auth/venv/lib/python3.6/site-packages/flask/cli.py", line 849, in run_command
    app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
    File "/home/d806848/flask-jwt-auth/venv/lib/python3.6/site-packages/flask/cli.py", line 324, in init
    self._load_unlocked()
    File "/home/d806848/flask-jwt-auth/venv/lib/python3.6/site-packages/flask/cli.py", line 350, in _load_unlocked
    self._app = rv = self.loader()
    File "/home/d806848/flask-jwt-auth/venv/lib/python3.6/site-packages/flask/cli.py", line 406, in load_app
    app = locate_app(self, import_name, name)
    File "/home/d806848/flask-jwt-auth/venv/lib/python3.6/site-packages/flask/cli.py", line 260, in locate_app
    import(module_name)
    File "/home/d806848/flask-jwt-auth/run.py", line 25, in
    @jwt.token_in_blacklist_loader
    AttributeError: 'JWTManager' object has no attribute 'token_in_blacklist_loader'
    (venv) d806848@nebula-03:~/flask-jwt-auth$

The specified alg value is not allowed

Iv'e tired to run this example but without success.

[2020-01-08 08:28:14,067] ERROR in app: Exception on /secret [GET]
Traceback (most recent call last):
  File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask_restful/__init__.py", line 458, in wrapper
    resp = resource(*args, **kwargs)
  File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask/views.py", line 89, in view
    return self.dispatch_request(*args, **kwargs)
  File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask_restful/__init__.py", line 573, in dispatch_request
    resp = meth(*args, **kwargs)
  File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask_jwt_extended/view_decorators.py", line 107, in wrapper
    verify_jwt_in_request()
  File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask_jwt_extended/view_decorators.py", line 32, in verify_jwt_in_request
    jwt_data, jwt_header = _decode_jwt_from_request(request_type='access')
  File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask_jwt_extended/view_decorators.py", line 294, in _decode_jwt_from_request
    decoded_token = decode_token(encoded_token, csrf_token)
  File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask_jwt_extended/utils.py", line 118, in decode_token
    allow_expired=allow_expired
  File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask_jwt_extended/tokens.py", line 140, in decode_jwt
    leeway=leeway, options=options, issuer=issuer)
  File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/jwt/api_jwt.py", line 92, in decode
    jwt, key=key, algorithms=algorithms, options=options, **kwargs
  File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/jwt/api_jws.py", line 156, in decode
    key, algorithms)
  File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/jwt/api_jws.py", line 216, in _verify_signature
    raise InvalidAlgorithmError('The specified alg value is not allowed')
jwt.exceptions.InvalidAlgorithmError: The specified alg value is not allowed
127.0.0.1 - - [08/Jan/2020 08:28:14] "GET /secret HTTP/1.1" 500 -

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.