appwrite: JWT does not seem to authenticate in Python

🐛 Bug Report

JWT does not seem to authenticate in Python

Have you spent some time to check if this issue has been raised before?

Yes

To Reproduce

client = Client().set_endpoint(ENDPOINT).set_project(PROJECT).set_j_w_t(token)
account = Account(client)
account.get()

Expected behavior

Autheticate the user

Actual Behavior

User (role: guest) missing scope (account)

Before that, the lower() method must be removed in client.py

def set_j_w_t(self, value):
     """Your secret JSON Web Token"""

     self._global_headers['x-appwrite-jwt'] = value #.lower()
     return self

Otherwise:

Failed to verify JWT. JSON failed: Syntax error

Your Environment

  • Appwrite 0.8
  • Python 3.8
  • Raspberry Pi 4
  • Ubuntu Server 20.04.2 LTS

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24 (11 by maintainers)

Most upvoted comments

@JakeAi Not sure, but there is a comment about the root user in the code,

https://github.com/appwrite/appwrite/blob/080c26e3599adcf603e484ec87eb13c9427939d3/app/controllers/general.php#L259

Interesting… I guess we will wait for a dev response