From 76deb5ba0cc8ad3b6d5a07e2a0cb604d621c05a8 Mon Sep 17 00:00:00 2001 From: Natalie Bunduwongse Date: Tue, 15 Oct 2024 19:12:13 +1300 Subject: [PATCH] fix: webgl login method --- .../sample/Assets/Scripts/SelectAuthMethodScript.cs | 6 +++--- .../sample/ProjectSettings/PackageManagerSettings.asset | 2 +- .../Samples~/sample/ProjectSettings/ProjectSettings.asset | 5 ++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Packages/Passport/Samples~/sample/Assets/Scripts/SelectAuthMethodScript.cs b/src/Packages/Passport/Samples~/sample/Assets/Scripts/SelectAuthMethodScript.cs index e42210d8..5db3ddb5 100644 --- a/src/Packages/Passport/Samples~/sample/Assets/Scripts/SelectAuthMethodScript.cs +++ b/src/Packages/Passport/Samples~/sample/Assets/Scripts/SelectAuthMethodScript.cs @@ -16,13 +16,13 @@ public class SelectAuthMethodScript : MonoBehaviour void Start() { + // Determine if PKCE is supported based on the platform + SampleAppManager.SupportsPKCE = IsPKCESupported(); + // WebGL does not support Device Code Auth, so we'll use PKCE by default instead. #if UNITY_WEBGL UsePKCE(); #else - // Determine if PKCE is supported based on the platform - SampleAppManager.SupportsPKCE = IsPKCESupported(); - // If PKCE is not supported, initialise Passport to use Device Code Auth if (!SampleAppManager.SupportsPKCE) { diff --git a/src/Packages/Passport/Samples~/sample/ProjectSettings/PackageManagerSettings.asset b/src/Packages/Passport/Samples~/sample/ProjectSettings/PackageManagerSettings.asset index 34b37aba..3359ac04 100644 --- a/src/Packages/Passport/Samples~/sample/ProjectSettings/PackageManagerSettings.asset +++ b/src/Packages/Passport/Samples~/sample/ProjectSettings/PackageManagerSettings.asset @@ -50,7 +50,7 @@ MonoBehaviour: m_IsDefault: 0 m_Capabilities: 0 m_ConfigSource: 4 - m_UserSelectedRegistryName: npmjs + m_UserSelectedRegistryName: Open UPM Packages m_UserAddingNewScopedRegistry: 0 m_RegistryInfoDraft: m_Modified: 0 diff --git a/src/Packages/Passport/Samples~/sample/ProjectSettings/ProjectSettings.asset b/src/Packages/Passport/Samples~/sample/ProjectSettings/ProjectSettings.asset index b0552849..dac08bfa 100644 --- a/src/Packages/Passport/Samples~/sample/ProjectSettings/ProjectSettings.asset +++ b/src/Packages/Passport/Samples~/sample/ProjectSettings/ProjectSettings.asset @@ -502,6 +502,9 @@ PlayerSettings: - m_BuildTarget: WindowsStandaloneSupport m_APIs: 02000000 m_Automatic: 1 + - m_BuildTarget: WebGLSupport + m_APIs: 080000000b000000 + m_Automatic: 1 m_BuildTargetVRSettings: [] m_DefaultShaderChunkSizeInMB: 16 m_DefaultShaderChunkCount: 0 @@ -762,7 +765,7 @@ PlayerSettings: webGLTemplate: PROJECT:unity-webview webGLAnalyzeBuildSize: 0 webGLUseEmbeddedResources: 0 - webGLCompressionFormat: 0 + webGLCompressionFormat: 2 webGLWasmArithmeticExceptions: 0 webGLLinkerTarget: 1 webGLThreadsSupport: 0