OSL Social Login
A unified Unity social login layer that reduces provider integration work through one API, selective activation, centralized setup, and build automation.
Overview
OSL Social Login keeps Google, Facebook, Apple, Steam, and Discord integration details behind ISocialLoginProvider and SocialLoginManager. Provider defines and setup tooling let a project configure the adapters it needs while preserving one game-facing sign-in contract.
Who Should Use This
Use OSL Social Login when your Unity project needs:
- One login-facing API across multiple providers
- Provider-specific code that can be activated only when needed
- Build-time setup support for platform metadata
- A clean Unity-side integration layer for social login features
Features
- Unified Interface: Use provider adapters to perform login operations with a consistent style.
- Centralized Editor Setup: Manage provider setup through an editor window.
- Soft Dependencies: Provider-specific code can be excluded when the related SDK is not imported.
- Build Support: Platform-specific build settings can be prepared through package tooling.
Requirements
- Unity 2021.3 LTS minimum
- Unity 2021.3.45f2 and 6000.3.12f1 tested for package-isolation import and compile
- Provider-specific credentials, dashboard configuration, and vendor SDK/runtime prerequisites
- Steam: included Windows x64 runtime path and a running, signed-in Steam client
- Discord loopback: Unity Editor and Windows standalone code path with registered ports 50000-50009
Credentials returned to the Unity client still require backend verification before they are used to create a trusted game session. Conditional compilation isolates provider code, but the project's chosen vendor SDKs and included bridge/native files must still be reviewed for each build target.
Getting Started
- Install OSL Social Login:
- Search for OSL Social Login in the Unity Asset Store, or open it directly at Unity Asset Store (OSL Social Login).
- Click Add to My Assets.
- In Unity, go to Window > Package Manager, select Packages: My Assets, locate the package, download and click Import.
- Import SDKs: Import the provider SDKs required for your target platforms.
- Configure Settings:
- Open Tools > OSL > Social Login Setup.
- Enable the providers you plan to use.
- Enter the provider settings required by your project.
- Click Apply Settings.
- Usage Example:
var googleProvider = new GProvider(); googleProvider.Signin((result) => { if (result.IsSuccess) { Debug.Log("Login succeeded."); } });
Platform Notes
Each provider has its own platform requirements and developer console settings. Check the relevant provider documentation when enabling a provider.
Apple Sign-In
- Supported on iOS through native Apple authentication APIs.
- User profile values may not be returned on every sign-in.
Facebook Login
- Supported on iOS, Android, and WebGL.
- WebGL integrations require a secure HTTPS page.
Google Sign-In
- Supported on iOS, Android, WebGL, and Standalone PC depending on the selected integration path.
- Mobile integrations may require dependency resolution through standard Unity mobile dependency tools.
Steamworks
- The included Facepunch and native runtime path targets Windows x64.
- Requires the Steam client and the provider-specific development setup.
Discord
- The included browser-loopback adapter compiles for the Unity Editor and Windows standalone path.
- Requires provider-side redirect URI configuration.
Troubleshooting
| Symptom | Likely cause | Action |
|---|---|---|
| Provider class does not compile | Matching SDK or scripting define is missing | Import the provider SDK and enable the provider in the setup window. |
| WebGL login is blocked | Test page is not served over HTTPS | Serve the page through HTTPS. |
| Provider callback does not return | Provider console setup is incomplete | Recheck the provider's developer console settings. |
| Build fails after enabling a provider | Platform dependency is missing | Install the required SDK or disable that provider. |