Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Do I still need a pusher key? #25

Closed
mathewparet opened this issue Dec 6, 2018 · 7 comments
Closed

Do I still need a pusher key? #25

mathewparet opened this issue Dec 6, 2018 · 7 comments

Comments

@mathewparet
Copy link

I can see in the example code provided in your documentation you have used something similar a lot:

'pusher' => [
    'driver' => 'pusher',
    'key' => env('PUSHER_APP_KEY'),
    'secret' => env('PUSHER_APP_SECRET'),
    'app_id' => env('PUSHER_APP_ID'),
    'options' => [
        'cluster' => env('PUSHER_APP_CLUSTER'),
        'encrypted' => true,
        'host' => '127.0.0.1',
        'port' => 6001,
        'scheme' => 'http'
    ],
],

and:

import Echo from "laravel-echo"

window.Pusher = require('pusher-js');

window.Echo = new Echo({
    broadcaster: 'pusher',
    key: 'your-pusher-key',
    wsHost: window.location.hostname,
    wsPort: 6001,
    disableStats: true,
});

So do I still need a PUSHER_APP_SECRET or PUSHER_APP_ID or PUSHER_APP_CLUSTER or pusher-key for this to work?!

@LKaemmerling
Copy link
Contributor

You can generate every secret you want :) You don't need a Pusher Account anymore.

@mathewparet
Copy link
Author

You can generate every secret you want :) You don't need a Pusher Account anymore.

Sorry if this is too much basic. But my understanding is pusher secret, app id, key are generated on Pusher. So are you saying, to use this websocket module, I don't need to define key, secret or app id?

@LKaemmerling
Copy link
Contributor

I say you don't need to use a secret from pusher. You can generate every string you want :)

@mathewparet
Copy link
Author

Thanks for that 👍

@BenQoder
Copy link

@mathewparet Did using random strings work for you?

@stayallive
Copy link
Contributor

@BenQoder check out https://docs.beyondco.de/laravel-websockets/1.0/getting-started/installation.html

There are the "random strings" defined. They're not totally random as in you can put in anything in the client, but are defined in websockets.php and can be anything you wish. As long as you use the PUSHER_* settings in your .env they will both be set in websockets.php and services.php and set everything correctly.

So if you follow along the installation you can set any random string it it will just work ™️

@jimmyt2003
Copy link

Its not obvious from the docs

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants