Completely getting rid of "userid"
Previously, userid was generated by the "/login" route and passed along. This commit completely removes the uuid "userid" (and disables the LoginController too and any Jwt check). "userid" is replaced by the "socket id" of the connection. So a user is now identified using a socket id, which is unique for a given connection.
This commit is contained in:
@@ -67,7 +67,7 @@ export class GameManager {
|
||||
*/
|
||||
createCurrentPlayer(): void {
|
||||
//Get started room send by the backend
|
||||
this.currentGameScene.createCurrentPlayer(this.ConnexionInstance.userId);
|
||||
this.currentGameScene.createCurrentPlayer();
|
||||
this.status = StatusGameManagerEnum.CURRENT_USER_CREATED;
|
||||
}
|
||||
|
||||
@@ -119,6 +119,10 @@ export class GameManager {
|
||||
return this.playerName;
|
||||
}
|
||||
|
||||
getPlayerId(): string {
|
||||
return this.ConnexionInstance.userId;
|
||||
}
|
||||
|
||||
getCharacterSelected(): string {
|
||||
return this.characterUserSelected;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user