Hello!
I’m using the Token Base Auth because I need to sign in and sign up the users with Firebase Auth.
Firebase has a REST API that I can use to sign in my users and get the auth token, this works fine and I can store the token successfully, however when I try to fetch the user data I need to use a post a method that sends de token as a parameter and the Token Base Auth doesn’t accept this type of method so I’m kinda stuck there at the user authentication.
Well, I think you’re hitting a limitation of our plugin here. Because it doesn’t handle a case where getMe is a POST request using the token as a query param. To be honest its not a common pattern at all, I would even say its wild haha
(I mean, its even in the function name, get account info )
You can make a feature request on feedback.weweb.io so we can try to support this case!
In the meantime I think you should probably handle the authentication yourself. Its totally doable and fine if everything you want to be private is already protected by your backend (like firebase).
Create 2 variables, auth token and user and toggle preserve on navigation + local storage on both
Create your signup/login workflows using the endpoints from the doc and our REST API plugin.
You can create a workflow on app load or on page load and redirect your users to the login page if they are not logged in