jwt token, localStorage undefined

how can i protect my flask backend using better-auth jwt?
im following this currently:
https://www.better-auth.com/docs/plugins/bearer
and im getting localStorage is undefined in the auth section for authClient. but even past this, i'm unsure of the workflow of how to go from this to protecting api routes (not for flask specifically but in general)
Authenticate API requests using Bearer tokens instead of browser cookies
Was this page helpful?