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 1d07784 commit 9b6f061Copy full SHA for 9b6f061
src/module.ts
@@ -19,6 +19,7 @@ const defaultModuleOptions: ModuleOptions = {
19
scheme: 'https',
20
transports: ['ws', 'wss'],
21
authentication: {
22
+ mode: 'cookie',
23
baseUrl: 'http://localhost:80',
24
authEndpoint: '/broadcasting/auth',
25
csrfEndpoint: '/sanctum/csrf-cookie',
src/runtime/plugin.client.ts
@@ -36,7 +36,7 @@ function createFetchClient(
36
37
async onRequest(context) {
38
// todo: move this to interceptors
39
- if (authentication.mode === 'token') {
+ if (authentication.mode === 'cookie') {
40
let csrfToken = readCsrfCookie(authentication.csrfCookie)
41
42
if (!csrfToken.value) {
0 commit comments