File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change 34
34
35
35
import { assertConfig } from "./lib/assert.js"
36
36
import { ErrorPageLoop } from "./errors.js"
37
- import { AuthInternal } from "./lib/index.js"
37
+ import { AuthInternal , skipCSRFCheck } from "./lib/index.js"
38
38
import renderPage from "./lib/pages/index.js"
39
39
import { logger , setLogger , type LoggerInstance } from "./lib/utils/logger.js"
40
40
import { toInternalRequest , toResponse } from "./lib/web.js"
@@ -51,6 +51,8 @@ import type {
51
51
import type { Provider } from "./providers/index.js"
52
52
import { JWTOptions } from "./jwt.js"
53
53
54
+ export { skipCSRFCheck }
55
+
54
56
/**
55
57
* Core functionality provided by Auth.js.
56
58
*
@@ -298,14 +300,3 @@ export interface AuthConfig {
298
300
trustHost ?: boolean
299
301
skipCSRFCheck ?: typeof skipCSRFCheck
300
302
}
301
-
302
- /**
303
- * :::danger
304
- * This option is inteded for framework authors.
305
- * :::
306
- *
307
- * Auth.js comes with built-in {@link https://authjs.dev/concepts/security#csrf CSRF} protection, but
308
- * if you are implementing a framework that is already protected against CSRF attacks, you can skip this check by
309
- * passing this value to {@link AuthConfig.skipCSRFCheck}.
310
- */
311
- export const skipCSRFCheck = Symbol ( "skip-csrf-check" )
Original file line number Diff line number Diff line change 1
1
import { UnknownAction } from "../errors.js"
2
- import { skipCSRFCheck } from "../index.js"
3
2
import { SessionStore } from "./cookie.js"
4
3
import { init } from "./init.js"
5
4
import renderPage from "./pages/index.js"
@@ -186,3 +185,14 @@ export async function AuthInternal<
186
185
}
187
186
throw new UnknownAction ( `Cannot handle action: ${ action } ` )
188
187
}
188
+
189
+ /**
190
+ * :::danger
191
+ * This option is inteded for framework authors.
192
+ * :::
193
+ *
194
+ * Auth.js comes with built-in {@link https://authjs.dev/concepts/security#csrf CSRF} protection, but
195
+ * if you are implementing a framework that is already protected against CSRF attacks, you can skip this check by
196
+ * passing this value to {@link AuthConfig.skipCSRFCheck}.
197
+ */
198
+ export const skipCSRFCheck = Symbol ( "skip-csrf-check" )
You can’t perform that action at this time.
0 commit comments