-
Notifications
You must be signed in to change notification settings - Fork 186
User Authentication #340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User Authentication #340
Conversation
So how would we ensure people have Pusher JS SDK 7.1+ installed? |
|
Hi @rennokki, thanks for the great work How to use this in soketi? is any change needed? |
|
||
if (token) { | ||
this.options.auth.headers['X-CSRF-TOKEN'] = token; | ||
this.options.userAuthentication.headers['X-CSRF-TOKEN'] = token; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rennokki
What about bearer token support?
echo/src/connector/connector.ts
Lines 16 to 18 in f7e2373
broadcaster: 'pusher', | |
csrfToken: null, | |
host: null, |
if (token) {
this.options.auth.headers['X-CSRF-TOKEN'] = token;
this.options.userAuthentication.headers['X-CSRF-TOKEN'] = token;
}
token = this.options.bearerToken;
if (token) {
this.options.auth.headers['Authorization'] = 'Bearer '+ token;
this.options.userAuthentication.headers['Authorization'] = 'Bearer '+ token;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rennokki ping
Context
signin()
method: https://pusher.com/docs/channels/using_channels/user-authentication/#sign-inCaveats
This version requires Pusher JS SDK 7.1+ (https://github.com/pusher/pusher-js/releases/tag/v7.1.0-beta)
This PR needs to be merged before:
Breaking Changes
None.