pltoledo
BABetter Auth
•Created by pltoledo on 2/20/2025 in #help
Bearer headers not returning even with CORS configured
First of all, thank you for the amazing lib! I'm trying to setup a react SPA using Vite and run the authentication using the bearer plugin but can't seem to make the authentication work. My backend is a Hono server hosted elsewhere, which I've configured as follows:
The server, hosted in render as of now, is correctly returning the
Set-Auth-Token
header.
The problem is that, when called using the better auth client from inside the SPA, the token headers are not returned. And I know this is manageable using the actual response payload, but I was hoping to also use social login options using the bearer flow, and as I understand the token in there is returned in the headers.
Anyway, any help would be much appreciated!1 replies