mirumee / saleor-app-framework-python

Python Saleor App/Extension boilerplate. Batteries included.
https://mirumee.github.io/saleor-app-framework-python/
BSD 3-Clause "New" or "Revised" License
50 stars 23 forks source link

Fix require_permission dependency #37

Open przlada opened 2 years ago

przlada commented 2 years ago

I want to merge this change because it fixes require_permission dependency.

pkucmus commented 2 years ago

Thanks, please tell me, what was broken here, I can't seem to make sense of it.

przlada commented 2 years ago

@pkucmus this line wasn't working for me:

jwt_payload = jwt.decode(saleor_token, verify=False)

it should be

jwt_payload = jwt.JWT().decode(token, do_verify=False)

from what I found

pkucmus commented 2 years ago

That's not good. I wonder if we have fallen into the https://pyjwt.readthedocs.io/en/latest/ vs https://pypi.org/project/jwt/ trap here, I need to look deeper.