Trying to revoke a session server-side.
Hello! I have been trying to revoke a session server-side, I figured I could try to use:
As the function signature suggests, however when I do this I always get
And
userToken is provided to me in a request (Using Bun's HTTP-Server) as the header User-Token: <token>.
I also tried setting
as a header, but it doesn't seem to change anything.Solution:Jump to solution
If anyone else needs this:
- Install the
bearer plugin
- Create a headers object
- Set Authorization: Bearer <token>...1 Reply
Solution
If anyone else needs this:
- Install the
bearer plugin
- Create a headers object
- Set Authorization: Bearer <token>
- Call
And you're done! If you want you can also pass in the request's headers directly :P