pocketbase icon indicating copy to clipboard operation
pocketbase copied to clipboard

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

Open Marco943 opened this issue 1 year ago • 1 comments

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?

Marco943 avatar Apr 25 '24 18:04 Marco943

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.

vaphes avatar Apr 26 '24 15:04 vaphes