Skip to content

Instantly share code, notes, and snippets.


rjkz808/main.js Secret

Created Dec 2, 2019
What would you like to do?
Photon Chat JavaScript SDK custom authentication
/// <reference path="photon/Photon-Javascript_SDK.d.ts"/>
class ChatDemo extends Photon.Chat.ChatClient {
constructor() {
super(Photon.ConnectionProtocol.Ws, 'MY_APP_ID', '1.0');
const type = Photon.LoadBalancing.Constants.CustomAuthenticationType.Custom;
this.setCustomAuthentication('', type, {
'(string)message': 'some_data',
window.onload = () => {
new ChatDemo().connectToRegionFrontEnd('EU');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.