vaphes / pocketbase

PocketBase client SDK for python
https://pypi.org/project/pocketbase/
MIT License
331 stars 38 forks source link

[Help] How to check if token is valid or has expired #85

Closed Marco943 closed 3 months ago

Marco943 commented 5 months ago

In JS SDK, there's a method to verify if a given token is still valid. pb.authStore.isValid I didn't find any equivalent in this Python SDK. The problem is, it also doesn't throw an error if an expired token tries to list records that was previously authorized to, it just returns an empty list. Is there any way to check if a token has expired or is still valid?

vaphes commented 5 months ago

Hello @Marco943.

Right now this feature is still not available. I will be looking into it as soon as I get some spare time (probably in 2 weeks time) or you can make a pull request and I will promptly check it and, if all seems good, merge it.

Thanks for the feedback.