We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23f1ac0 commit 4e0049eCopy full SHA for 4e0049e
src/runtime/composables/useSession.ts
@@ -99,6 +99,9 @@ export default async (initialGetSessionOptions: UseSessionOptions = {}) => {
99
action = 'callback'
100
}
101
102
+ const csrfTokenResult = await getCsrfToken()
103
+ const csrfToken = csrfTokenResult.value.csrfToken
104
+
105
const data = await _fetch<{ url: string }>(`${action}/${provider}`, {
106
method: 'post',
107
headers: {
@@ -108,7 +111,7 @@ export default async (initialGetSessionOptions: UseSessionOptions = {}) => {
108
111
// @ts-expect-error
109
112
body: new URLSearchParams({
110
113
...options,
- csrfToken: await getCsrfToken(),
114
+ csrfToken,
115
callbackUrl,
116
json: true
117
})
0 commit comments