Closed paulocoutinhox closed 1 year ago
Hi,
After debug a lot your code, i found my problem.
You need use only the token in authentication header.
Need change inside file client.py from:
client.py
auth_type = "Admin" if hasattr(self.auth_store.model, "verified"): auth_type = "User" config["headers"] = config.get("headers", {}) config["headers"].update( {"Authorization": f"{auth_type} {self.auth_store.token}"} )
to:
config["headers"] = config.get("headers", {}) config["headers"].update( {"Authorization": f"{self.auth_store.token}"} )
or
config["headers"] = config.get("headers", {}) config["headers"].update( {"Authorization": f"Bearer {self.auth_store.token}"} )
This is documented in: https://pocketbase.io/docs/authentication/#authenticate-as-admin
Can you make a fast hotfix?
Thanks.
I made a PR: https://github.com/vaphes/pocketbase/pull/20
Hi as I have mentioned in #20, this can be closed now, because solution has been merged already.
Hi,
After debug a lot your code, i found my problem.
You need use only the token in authentication header.
Need change inside file
client.py
from:to:
or
This is documented in: https://pocketbase.io/docs/authentication/#authenticate-as-admin
Can you make a fast hotfix?
Thanks.