用户管理

用户管理

为你的游戏后端提供完整的玩家身份认证与身份管理

免费开始使用

多种认证方式

支持邮箱、匿名游客账号、Apple Sign-In 和 Google OAuth。玩家自由选择登录方式。

基于角色的访问控制

通过角色分配来控制每位用户的操作权限,内置管理员和玩家角色体系。

跨平台会话

玩家只需登录一次,即可在所有设备上无缝保持登录状态。

开箱即用的 App Store 合规

horizOn User Management 现在支持 Sign in with Apple。只需注册一次 Team ID、Services ID 和 Bundle ID。你的 iOS 构建会立即符合要求。

快速集成

快速集成

MyGame 认证

欢迎回来,玩家

player@example.com
••••••••
C#
// Unity C# - User Authentication
using HorizOn;

var horizon = new HorizonClient("YOUR_API_KEY");

// Sign up with email
var result = await horizon.Auth.SignUpEmail(
    "player@example.com", "securePassword", "PlayerOne"
);

// Sign in
var session = await horizon.Auth.SignInEmail(
    "player@example.com", "securePassword"
);

// Anonymous sign up (guest account)
var guest = await horizon.Auth.SignUpAnonymous("GuestPlayer");
REST
# REST API - User Authentication

# Sign up with email
curl -X POST https://eu.horizon.pm/api/v1/app/user-management/signup \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"EMAIL","email":"player@example.com","password":"securePassword","username":"PlayerOne"}'

# Sign in with email
curl -X POST https://eu.horizon.pm/api/v1/app/user-management/signin \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"EMAIL","email":"player@example.com","password":"securePassword"}'

# Anonymous sign up (guest account)
curl -X POST https://eu.horizon.pm/api/v1/app/user-management/signup \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"ANONYMOUS","username":"GuestPlayer"}'
常见问题

常见问题

准备好开始集成了吗?

今天就开始使用 horizOn 构建你的游戏后端,免费套餐开箱即用。