Forráskód Böngészése

fix(game): auth provider format

Bryan Lee 1 éve
szülő
commit
bb2d3bbecd

+ 3 - 2
project/authentication/providers/apple_game_center_auth_provider.gd

@@ -14,8 +14,9 @@ func initialize() -> Result:
 		return auth_result
 	var auth_data = auth_result.unwrap()
 
-	user_id = auth_data.player_id
+	provider_type = "game_center"
+	provider_id = auth_data.player_id
 	user_name = auth_data.displayName
-	print("Logged in with Game Center as ", user_name)
+	print("Logged in with Game Center as ", user_name.unwrap())
 
 	return Result.Ok(null)

+ 4 - 3
project/authentication/providers/google_play_games_auth_provider.gd

@@ -23,8 +23,9 @@ func initialize() -> Result:
 	google_play_games.core.players_client.load_current_player(true)
 	player = await google_play_games.core.players_client.current_player_loaded
 	
-	user_id = player.player_id
-	user_name = player.display_name
-	print("Logged in with Play Games as ", user_name)
+	provider_type = "play_games"
+	provider_id = player.player_id
+	user_name = Option.Some(player.display_name)
+	print("Logged in with Play Games as ", user_name.unwrap())
 
 	return Result.Ok(null)

+ 4 - 3
project/authentication/providers/steam_auth_provider.gd

@@ -7,8 +7,9 @@ func _init() -> void:
 
 
 func initialize() -> Result:
-	user_id = str(Steam.getSteamID())
-	user_name = Steam.getPersonaName()
-	print("Logged in with Steam as ", user_name)
+	provider_type = "steam"
+	provider_id = str(Steam.getSteamID())
+	user_name = Option.Some(Steam.getPersonaName())
+	print("Logged in with Steam as ", user_name.unwrap())
 
 	return Result.Ok(null)

+ 1 - 0
project/authentication/providers/web_oauth2_auth_provider.gd

@@ -26,6 +26,7 @@ func initialize() -> Result:
 	user_name = Option.new(user_info.name)
 	picture_url = Option.new(user_info.picture)
 	locale = Option.new(user_info.locale)
+	print("Logged in via the web as ", user_name.unwrap())
 	
 	return Result.Ok(null)