solution (maybe): Verifying the admin token when extending pocketbase as a framework #4888
Nciso
started this conversation in
Show and tell
Replies: 1 comment
-
For the JWT reading and verification you can also use the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I have been using Pocketbase for a couple of months now; I was running a use case where I needed to validate the jwt from an admin user. I know there is the middleware of
APIs.RequireAdminAuth(),
, but I needed to verify the token from URL param because this strange use case I had.I am also new to Go, so here is what I did
These are my functions from the auth package
So perhaps I am repeating myself. I wanted to share it because I don't know if this is the right path, but either way, I think I can contribute someday to the project. Any feedback is welcome
Beta Was this translation helpful? Give feedback.
All reactions