-
Notifications
You must be signed in to change notification settings - Fork 288
Open
Labels
Description
Which middleware has the bug?
@hono/auth-js
What version of the middleware?
1.0.5
What version of Hono are you using?
4.7.5
What runtime/platform is your app running on? (with version if possible)
bun 1.2.9
What steps can reproduce the bug?
The backend is running on a different port / url. I attempt to set a new base path via the authConfigManager
import { authConfigManager, SessionProvider } from '@hono/auth-js/react';
authConfigManager.setConfig({
basePath: 'http://localhost:8000/api/auth', // if auth route is diff from /api/auth
});And use a simple sign up method
"use client"
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { signIn } from '@hono/auth-js/react';
export function LoginForm({
className,
...props
}: React.ComponentProps<'form'>) {
// const providers = await getProviders();
// console.log('Providers', providers);
return (
<form
action={() => {
// 'use server';
signIn('github');
}}
>
<button type="submit">Sign In</button>
</form>
);
}
### What is the expected behavior?
A request is made against `http://localhost:8000/api/auth/session`
### What do you see instead?
A request is attempted against `http://localhost:3000http://localhost:8000/api/auth/session`
### Additional information
Additional question is if CORS would work correctly in this case and if the cookies would be set for the correct domains.Reactions are currently unavailable