Skip to content

Commit

Permalink
fix(client): export getCsrfToken directly to support Webpack 5
Browse files Browse the repository at this point in the history
Fixes `Attempted import error: 'getCsrfToken' is not exported from 'next-auth/client' (imported as 'getCsrfToken’).`-error.
  • Loading branch information
gavro committed Apr 21, 2021
1 parent cb1e5a7 commit a2705fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export async function getSession (ctx) {
return session
}

async function getCsrfToken (ctx) {
export async function getCsrfToken (ctx) {
return (await _fetchData('csrf', ctx))?.csrfToken
}

Expand Down

1 comment on commit a2705fb

@vercel
Copy link

@vercel vercel bot commented on a2705fb Apr 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.