Grmayt
Grmayt
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
🔥
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
Okay, will do. Thanks!!
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
I'm closing one
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
Thank you very much. Appreciate that. haha
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
"cookie": "better-auth.session_token=FhCbI3ebCrNdvvd9oXVzmUfdChg7KjMl.1lWf7Jt%2F1FQ0yx8kvsq6dnfgNsF6vYcSW%2BtK8%2FFcmd0%3D",
"cookie": "better-auth.session_token=FhCbI3ebCrNdvvd9oXVzmUfdChg7KjMl.1lWf7Jt%2F1FQ0yx8kvsq6dnfgNsF6vYcSW%2BtK8%2FFcmd0%3D",
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
I can see the cookie
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
when logging in
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
method: "GET", url: "http://localhost:3000/api/auth/callback/google?state=RwWTDprNonWUPi3oGtE3n4G7T-7jo5AM&code=4%2F0Ab_5qlnLv4NRU3wENSEJ3UEdQjlQghjVdn7zYssnwvYL0k01xW0Iydy1PHisK3sB-qzkZQ&scope=email+profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+openid&authuser=0&prompt=none", headers: Headers { "host": "localhost:3000", "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8", "sec-fetch-mode": "navigate", "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1 Mobile/15E148 Safari/604.1", "accept-language": "en-CA,en-US;q=0.9,en;q=0.8", "sec-fetch-dest": "document", "accept-encoding": "gzip, deflate", "cookie": "better-auth.session_token=FhCbI3ebCrNdvvd9oXVzmUfdChg7KjMl.1lWf7Jt%2F1FQ0yx8kvsq6dnfgNsF6vYcSW%2BtK8%2FFcmd0%3D", "connection": "keep-alive", "sec-fetch-site": "none", "priority": "u=0, i", } }
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
ok
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
it in the doc
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
do something
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
app.use('*', async (c, next) => {
console.log('🚀 ~ app.use ~ c:', c.req.raw);
const session = await auth.api.getSession({ headers: c.req.raw.headers });

console.log('🚀 ~ app.use ~ session:', session);
if (!session) {
c.set('user', null);
c.set('session', null);
return next();
}

c.set('user', session.user);
c.set('session', session.session);
return next();
});
app.use('*', async (c, next) => {
console.log('🚀 ~ app.use ~ c:', c.req.raw);
const session = await auth.api.getSession({ headers: c.req.raw.headers });

console.log('🚀 ~ app.use ~ session:', session);
if (!session) {
c.set('user', null);
c.set('session', null);
return next();
}

c.set('user', session.user);
c.set('session', session.session);
return next();
});
Would this one
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
No I haven't made any endpoint for getting it
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
I'm checking the log here
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
app.on(['POST', 'GET'], '/api/auth/**', c => {
console.log(':rocket: ~ c:', c.req.raw);
return auth.handler(c.req.raw);
});
app.on(['POST', 'GET'], '/api/auth/**', c => {
console.log(':rocket: ~ c:', c.req.raw);
return auth.handler(c.req.raw);
});
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
It's not the frontend is hitting the get-session when using useSession
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
It's from the backend
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
It's hitting the /get-sessions endpoint
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
No description
113 replies
BABetter Auth
Created by Grmayt on 4/6/2025 in #help
Expo and hono.js
1.2.6-beta.4
113 replies