Skip to content

Issues while trying to connect Presence/Private Channels with authModule (Sanctum & Soketi) #73

@pexch

Description

@pexch

I am using Soketi as the server to receive requests. It seems that public channels work fine, but when I enable auth for presence/private channels, I end up running into the issue below. I am using Sanctum for authentication, I've enabled the required configuration for Laravel for Sanctum to work with the authEndpoint below.

Also I am using Cookie based Sessions, not tokens

nuxt.config.js

buildModules: [
  ...
  '@nuxtjs/laravel-echo',
],

echo: {
    broadcaster: 'pusher',
    authEndpoint : 'http://127.0.0.1:8000/api/broadcasting/auth',
    authModule: true,
    wsHost: '127.0.0.1',
    wsPort: 6001,
    key: 'my_key',
    encrypted: true,
    enableLogging: false,
    connectOnLogin: false,
    disconnectOnLogout: false,
    disableStats: false,
    forceTLS: false
  }

Error:

[x] POST http://127.0.0.1:8000/api/broadcasting/auth 401 (Unauthorized)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions