AUTH4D-213 Preset provider hints in game SDKs

The authorization endpoint accepts provider_hint values discord, steam, epic, google, apple and microsoft. It forwards a valid hint to hosted login as provider. The API hint values were introduced with the hosted provider presets; this ticket adds the missing SDK values. See AUTH4D-125 (repository file docs/api-spec/auth4d-125.md), AUTH4D-146 (repository file docs/api-spec/auth4d-146.md) and AUTH4D-147 (repository file docs/api-spec/auth4d-147.md).

On browser sign-in, an enabled provider hint starts that provider without showing the method list. If the provider is disabled or not configured, hosted login shows the usual methods. A provider error returns to that list and does not start another provider attempt automatically. The hint is not stored with the authorization flow and does not grant access.

The hosted guest-upgrade page accepts the same provider values. It puts an enabled provider first in the list and still requires the player to choose and confirm. If it is disabled, the page keeps the usual order.

SDKs

  • @auth4/sdk-browser accepts google, apple and microsoft in LoginOptions.provider and GuestUpgradeOptions.provider, alongside Discord, Steam and Epic Games. Login sends provider_hint; guest upgrade sends provider.
  • Unity adds Auth4Provider.Google, Auth4Provider.Apple and Auth4Provider.Microsoft for UpgradeGuestAsync on native and WebGL platforms.
  • Godot upgrade_guest(provider) and Unreal UpgradeGuest(Provider, ...) accept these three names alongside Discord, Steam and Epic Games. Native SDK hints open the hosted guest-upgrade page; they do not change the device-authorization sign-in flow.
  • Every SDK still falls back to the normal hosted choices when the application has that provider turned off.

Tests

  • Browser SDK provider serialization and validation: pnpm --filter @auth4/sdk-browser test
  • Unity native and WebGL provider hint tests: dotnet test packages/sdk-unity/Tests~/Auth4.Protocol.Tests/Auth4.Protocol.Tests.csproj
  • Godot provider hint tests: GODOT_BIN=/path/to/godot node packages/sdk-godot/tests/run.mjs
  • Unreal provider hint tests: node packages/sdk-unreal/Tests/run-tests.mjs
  • API forwarding tests: cd tests/integration && pnpm exec vitest run auth4d-125.provider-hint.test.ts
  • Hosted login direct-start and disabled-provider fallback: pnpm exec playwright test -c tests/e2e/auth4d-213.playwright.config.ts

Source: docs/api-spec/auth4d-213.md