Skip to content

Commit a2705fb

Browse files
authored
fix(client): export getCsrfToken directly to support Webpack 5
Fixes `Attempted import error: 'getCsrfToken' is not exported from 'next-auth/client' (imported as 'getCsrfToken’).`-error.
1 parent cb1e5a7 commit a2705fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/client/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export async function getSession (ctx) {
145145
return session
146146
}
147147

148-
async function getCsrfToken (ctx) {
148+
export async function getCsrfToken (ctx) {
149149
return (await _fetchData('csrf', ctx))?.csrfToken
150150
}
151151

0 commit comments

Comments
 (0)