Problems with Form POST in Safari and IOS

I have this simple router, relying on a simple HTML form.
export const authSigninRouter = new Hono();

const SigninForm = ({ email = '', errors }) => {
  return (
    <form class="mt-5 grid gap-2 lg:gap-8" method="POST" action="/auth/signin">
      <label class="grid w-full gap-3">
        <span>Email address</span>
        <input type="email" name="email" />
      </label>
      <label class="grid w-full gap-3">
        <span>Password</span>
        <input type="password" name="password" />
      </label>
      <button>Signin</button>
    </form>
  );
};

authSigninRouter.get('/', async (c) => {
  return c.render(<SigninForm />);
});

authSigninRouter.post('/', async (c) => {
  const { email, password } = await c.req.parseBody();
  ///...
  const token = await sign(tokenUser);

  setCookie(c, 'bearer_token', token, { secure: true, httpOnly: true });

  return c.redirect('/');
});


Using chrome, on my computer, i have no problems whatsoever
Using Safari on the computer, or safari or chrome from my iphone, or safari on the iPhone simulator, it doesn't work.
I get the message on my server:
TypeError: Request aborted, code: "ABORT_ERR"

I'm using Hono with Bun, like so:

const app = new Hono();

Bun.serve({
  port: PORT,
  reload: true,
  fetch: app.fetch,
});

app.use('*', serveStatic({ root: 'public/' }));

app.route('/', appRouter);


any insights on why this may be happening?
Thanks
Was this page helpful?