Compare commits

...
Author SHA1 Message Date
adminandClaude Opus 4.5 3f6c55d8da Show invitation code panel when OAuth login requires invitation
When a new user tries to sign in via OAuth without an invitation code,
detect the "invitation code is required" error and show the invitation
code entry panel instead of just displaying a generic error message.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 19:12:19 -08:00
@@ -476,7 +476,14 @@ public class ConnectionHandler : MonoBehaviour, ILobbySubscriber, IDisposable {
// OnLoginSuccess or OnNewUserNeedsDisplayName will be called
} catch (Exception ex) {
Debug.LogError($"OAuth login failed: {ex.Message}");
if (oauthStatusText != null) { oauthStatusText.text = $"Login failed: {ex.Message}"; }
// Check if this is an invitation code error
if (ex.Message.Contains("invitation code is required")) {
OnInvitationRequired();
} else {
if (oauthStatusText != null) {
oauthStatusText.text = $"Login failed: {ex.Message}";
}
}
}
}