Closed endel closed 9 months ago
Overview for Auth API:
client.auth.onChange(function (authData) { if (authData.user != null) { // logged in! } else { // logged out! } });
client.auth.getUserData()
client.auth.registerWithEmailAndPassword()
client.auth.signInWithEmailAndPassword()
client.auth.signInAnonymously()
client.auth.sendPasswordResetEmail()
client.auth.signOut()
client.auth.signInWithProvider()
client.auth.signInWithEmailAndPassword("endel@colyseus.io", "123456", function(err, authData) { if (err != null) { trace(err); } else { trace("TOKEN => " + authData.token); trace("USER => " + authData.user); } })
Overview for Auth API:
Define callback for Auth state change:
Methods:
client.auth.getUserData()
client.auth.registerWithEmailAndPassword()
client.auth.signInWithEmailAndPassword()
client.auth.signInAnonymously()
client.auth.sendPasswordResetEmail()
client.auth.signOut()
client.auth.signInWithProvider()
Example