Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate user/admin token #107

Closed
RadekPelikan opened this issue Dec 13, 2022 · 1 comment
Closed

Validate user/admin token #107

RadekPelikan opened this issue Dec 13, 2022 · 1 comment

Comments

@RadekPelikan
Copy link

Maybe I don't understand the concept fully, but I would like to have a option to validate my token.

I use the API from pocketbase to connect to DB and I can not find a endpoint for validating a token. I don't want to auth with password to get a new token or making some nonsensical request, for example to view the records to check if it's valid. Is there some way to validate a user/admin auth token?

Thanks

@ganigeorgiev
Copy link
Member

We don't have an endpoint that will validate only the token at the moment (it could be added eventually with pocketbase/pocketbase#718).

The easiest way to validate a token would be to call refresh (eg. await pb.admins.refresh()). It throws an error on missing/invalid/expired AuthStore token.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants