You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: avoid redirect on always public paths (#5000)
* type safe babel config
* avoid auth redirect for `_next`
* force render default error page on user miconfig
* add slash to _next path
* use `.some`
* add docs
* change from localhost
* add favicon to public path
Copy file name to clipboardExpand all lines: docs/docs/errors.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,7 +152,7 @@ This error occurs when there was an issue deleting the session from the database
152
152
153
153
---
154
154
155
-
### Other
155
+
### Configuration
156
156
157
157
#### MISSING_NEXTAUTH_API_ROUTE_ERROR
158
158
@@ -164,6 +164,23 @@ Make sure the file is there and the filename is written correctly.
164
164
165
165
In production, we expect you to define a `secret` property in your configuration. In development, this is shown as a warning for convenience. [Read more](/configuration/options#secret)
166
166
167
+
168
+
#### AUTH_ON_ERROR_PAGE_ERROR
169
+
170
+
You have a custom error page defined that was rendered due to an error, but the page also required authentication. To avoid an infinite redirect loop, NextAuth.js bailed out and rendered its default error page instead.
171
+
172
+
If you are using a Middleware, make sure you include the same `pages` configuration in your `middleware.ts` and `[...nextauth].ts` files. Or use the `matcher` option to only require authentication for certain sites (and exclude your custom error page).
173
+
174
+
If you do not use a Middleware, make sure you don't try redirecting the user to the sign-in page when hitting your custom error page.
#### oauth_callback_error expected 200 OK with body but no body was returned
168
185
169
186
This error might happen with some of the providers. It happens due to `openid-client`(which is peer dependency) node version mismatch. For instance, `openid-client` requires `>=14.2.0` for `lts/fermium` and has similar limits for the other versions. For the full list of the compatible node versions please see [package.json](https://github.com/panva/node-openid-client/blob/2a84e46992e1ebeaf685c3f87b65663d126e81aa/package.json#L78)
0 commit comments