Skip to content

Added Game Center Authentication Support#257

Open
imperiumplay wants to merge 1 commit into
colyseus:masterfrom
imperiumplay:game-center-auth
Open

Added Game Center Authentication Support#257
imperiumplay wants to merge 1 commit into
colyseus:masterfrom
imperiumplay:game-center-auth

Conversation

@imperiumplay

Copy link
Copy Markdown

Summary

Adds client-side Game Center authentication support to the Colyseus Unity SDK, enabling iOS developers to authenticate users through Apple's Game Center service.

Changes

  • Added GameCenterCredentials class with required fields for Game Center authentication
  • Added SignInWithGameCenter<T>() method for typed authentication responses
  • Added SignInWithGameCenter() method for generic authentication responses

Integrates with existing auth flow, supports token caching, change callbacks, and error handling

Usage
var credentials = new GameCenterCredentials
{
    playerId = "G:123456789",
    bundleId = "com.yourcompany.yourgame",
    timestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
    salt = "base64EncodedSalt",
    signature = "base64EncodedSignature",
    publicKeyUrl = "https://static.gc.apple.com/public-key/..."
};

var authData = await client.Auth.SignInWithGameCenter<User>(credentials);

Server Requirements

colyseus/colyseus#885

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant