next-auth
8332c6ff - fix(next-auth): not redirecting to `/undefined` when signIn method throws an error (#11010)

Commit
1 year ago
fix(next-auth): not redirecting to `/undefined` when signIn method throws an error (#11010) * Fix NextAuth redirecting to /undefined when signIn method throws an error @auth/core `Auth` function can return an internalResponse or a Standard Response. Internal response has a `redirect` attribute. The problem is that the logic inside `Auth` method when there is an error is returning a Standard web Response which doesn't have `redirect` attribute but we can get redirecting url by using `headers.get('Origin')`. I think this fix this issue: https://github.com/nextauthjs/next-auth/issues/11008 * Move action test to tests folder * Remove test-adapter and add reference to docs * Defend from undefined responseUrl * Fix linter * chore(test): simplify tests --------- Co-authored-by: Thang Vu <hi@thvu.dev>
Author
Parents
Loading