Oauth in GoogleAddon
We are using better auth for a web app and a google addon so in web app we can use cookie based oauth login but in addon we can't, so we were trying to use bearer plugin but we are not able to get the 'set-auth-token' on onSuccess handler, i have tried onResponse handler also.
Also i don't know if bearer plugin is good fit for the google addon because it also sets the cookie.
What can we do in this case?
Solution:Jump to solution
so when you use social logins we can't set cookies cause it returns back to your back with redirect headers. What you should do is issue send the token as a part of redirect url
```ts
export const auth = betterAuth({
hooks: {
after: createAuthMiddleware(async(ctx)=>{...
1 Reply
Solution
so when you use social logins we can't set cookies cause it returns back to your back with redirect headers. What you should do is issue send the token as a part of redirect url