We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@hono/auth-js
1.0.15
4.6.11
Bun
import { signIn } from "@hono/auth-js/react"; function App() { return ( <> <Button onClick={() => signIn("google")}>Sign In now</Button> </> ); }
createRoot(document.getElementById('root')!).render( <StrictMode> <SessionProvider> <App /> </SessionProvider> </StrictMode> );
app.use( '*', initAuthConfig((c) => ({ secret: c.env.AUTH_SECRET, providers: [ GoogleProvider({ clientId: c.env.GOOGLE_CLIENT_ID, clientSecret: c.env.GOOGLE_CLIENT_SECRET, }), ], basePath: '/api/auth', })) ); app.use('/api/auth/*', authHandler()); app.use('/api/*', verifyAuth());
The user should be able to sign in, by clicking the sign in button.
The operation fails, returning a CSRF token missing.
Upon investigation, the CSRF token is not passed in the body to the Auth method Auth.js
Auth
middleware/packages/auth-js/src/index.ts
Line 138 in ecb7a1d
Auth.js expects to receive the csrfToken as part of the body on POST requests
csrfToken
POST
The text was updated successfully, but these errors were encountered:
@gkettani Thank you for the issue.
Hi @divyam234, Can you take a look?
Sorry, something went wrong.
No branches or pull requests
Which middleware has the bug?
@hono/auth-js
What version of the middleware?
1.0.15
What version of Hono are you using?
4.6.11
What runtime/platform is your app running on? (with version if possible)
Bun
What steps can reproduce the bug?
What is the expected behavior?
The user should be able to sign in, by clicking the sign in button.
What do you see instead?
The operation fails, returning a CSRF token missing.
Additional information
Upon investigation, the CSRF token is not passed in the body to the
Auth
method Auth.jsmiddleware/packages/auth-js/src/index.ts
Line 138 in ecb7a1d
Auth.js expects to receive the
csrfToken
as part of the body onPOST
requestsThe text was updated successfully, but these errors were encountered: