I created an auth room where I load the player data from the database
async onAuth(options) {
//FIXME check fb auth key
const data = await gameDao.fetchPlayer(options.uid);
if (data.rows.length > 0) {
return data.rows[0];
}
return false;
}
onJoin(client, options, auth) {
var player = new Player(client.id, auth.name);
client.player = player;
}
how to check in another room player data?
// Code from play room
async onAuth(options) {
// this need check player data
return false;
}
for example, that players can not enter the location for high levels or the availability of game modes for premium players