Releases: colyseus/colyseus-haxe
Releases · colyseus/colyseus-haxe
0.16.7
0.16.6
instance onAuth(): fix forwarding auth.token to server.
0.16.5
@colyseus/schema: improve instance sharing and ref count tracking.
0.16.4
bump version
0.16.3
AirSDK: fix cache/storage support via flash.net.SharedObject
0.16.2
fix bad import. closes #65
0.16.1
bring back onChange on collections
0.16.0
bump version
0.15.4
bump version
0.15.3
Overview for Auth API:
Define callback for Auth state change:
client.auth.onChange(function (authData) {
if (authData.user != null) {
// logged in!
} else {
// logged out!
}
});
Methods:
client.auth.getUserData()
client.auth.registerWithEmailAndPassword()
client.auth.signInWithEmailAndPassword()
client.auth.signInAnonymously()
client.auth.sendPasswordResetEmail()
client.auth.signOut()
- (❌ OAuth not yet implemented)
client.auth.signInWithProvider()
Example
client.auth.signInWithEmailAndPassword("[email protected]", "123456", function(err, authData) {
if (err != null) {
trace(err);
} else {
trace("TOKEN => " + authData.token);
trace("USER => " + authData.user);
}
})