Skip to content

Commit

Permalink
fix login parameter select account bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhichao Link committed Jul 12, 2023
1 parent 83db893 commit cd3bf45
Show file tree
Hide file tree
Showing 8 changed files with 442 additions and 284 deletions.
8 changes: 4 additions & 4 deletions Assembly-CSharp-firstpass.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LangVersion>9.0</LangVersion>
<LangVersion>8.0</LangVersion>
<_TargetFrameworkDirectories>non_empty_path_generated_by_unity.rider.package</_TargetFrameworkDirectories>
<_FullFrameworkReferenceAssemblyPaths>non_empty_path_generated_by_unity.rider.package</_FullFrameworkReferenceAssemblyPaths>
<DisableHandlePackageFileConflicts>true</DisableHandlePackageFileConflicts>
Expand Down Expand Up @@ -43,13 +43,13 @@
<ItemGroup>
<None Include="Assets/Plugins/Android/AndroidManifest.xml" />
<Reference Include="UnityEngine">
<HintPath>/Applications/Unity/Hub/Editor/2021.3.2f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.dll</HintPath>
<HintPath>/Applications/Unity/Hub/Editor/2020.3.26f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>/Applications/Unity/Hub/Editor/2021.3.2f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.CoreModule.dll</HintPath>
<HintPath>/Applications/Unity/Hub/Editor/2020.3.26f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEditor">
<HintPath>/Applications/Unity/Hub/Editor/2021.3.2f1/Unity.app/Contents/Managed/UnityEngine/UnityEditor.dll</HintPath>
<HintPath>/Applications/Unity/Hub/Editor/2020.3.26f1/Unity.app/Contents/Managed/UnityEngine/UnityEditor.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
617 changes: 346 additions & 271 deletions Assembly-CSharp.csproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Assets/ParticleNetwork/Mobile/Demo/AuthDemo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public async void Login()
{
// login email
var nativeResultData = await ParticleAuthService.Instance.Login(LoginType.PHONE, null, SupportAuthType.ALL,
false, SocialLoginPrompt.Select_account,
false, SocialLoginPrompt.SelectAccount,
new LoginAuthorization("0xa0869E99886e1b6737A4364F2cf9Bb454FD637E4", false));
Debug.Log(nativeResultData.data);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ public enum SocialLoginPrompt
{
None,
Consent,
Select_account,
SelectAccount,
}
}
23 changes: 19 additions & 4 deletions Assets/Plugins/iOS/.Swift/UnityManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,16 @@ extension UnityManager {
if account != nil, account!.isEmpty {
account = nil
}
let loginFormMode = data["loginFormMode"].bool
let loginFormMode = data["loginFormMode"].boolValue
let socialLoginPromptString = data["socialLoginPrompt"].stringValue.lowercased()
let socialLoginPrompt: SocialLoginPrompt? = SocialLoginPrompt(rawValue: socialLoginPromptString)

var socialLoginPrompt: SocialLoginPrompt?
if socialLoginPromptString == "none" {
socialLoginPrompt = SocialLoginPrompt.none
} else if socialLoginPromptString == "consent" {
socialLoginPrompt = SocialLoginPrompt.consent
} else if socialLoginPromptString == "selectaccount" {
socialLoginPrompt = SocialLoginPrompt.selectAccount
}
let message: String? = data["authorization"]["message"].string
let isUnique: Bool = data["authorization"]["uniq"].bool ?? false

Expand Down Expand Up @@ -1155,9 +1161,18 @@ extension UnityManager {
account = nil
}


let loginFormMode = data["loginFormMode"].boolValue
let socialLoginPromptString = data["socialLoginPrompt"].stringValue.lowercased()
let socialLoginPrompt: SocialLoginPrompt? = SocialLoginPrompt(rawValue: socialLoginPromptString)
var socialLoginPrompt: SocialLoginPrompt?
if socialLoginPromptString == "none" {
socialLoginPrompt = SocialLoginPrompt.none
} else if socialLoginPromptString == "consent" {
socialLoginPrompt = SocialLoginPrompt.consent
} else if socialLoginPromptString == "selectaccount" {
socialLoginPrompt = SocialLoginPrompt.selectAccount
}

connectConfig = ParticleConnectConfig(loginType: loginType, supportAuthType: supportAuthTypeArray, loginFormMode: loginFormMode, phoneOrEmailAccount: account, socialLoginPrompt: socialLoginPrompt)
}

Expand Down
4 changes: 2 additions & 2 deletions ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
m_EditorVersion: 2021.3.2f1
m_EditorVersionWithRevision: 2021.3.2f1 (d6360bedb9a0)
m_EditorVersion: 2020.3.26f1
m_EditorVersionWithRevision: 2020.3.26f1 (7298b473bc1a)
2 changes: 1 addition & 1 deletion ProjectSettings/RiderScriptEditorPersistedState.asset
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ MonoBehaviour:
m_Script: {fileID: 0}
m_Name:
m_EditorClassIdentifier: Unity.Rider.Editor:Packages.Rider.Editor:RiderScriptEditorPersistedState
lastWriteTicks: -8585131449153033296
lastWriteTicks: -8585124749604775808
68 changes: 68 additions & 0 deletions particle-unity-github.sln
Original file line number Diff line number Diff line change
@@ -1,17 +1,85 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEngine.UI", "UnityEngine.UI.csproj", "{8c128bad-74c4-c0bb-b048-a5cf73a38375}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEngine.TestRunner", "UnityEngine.TestRunner.csproj", "{c5df9f86-3e35-0f6e-0780-12c348a8f8b9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{c8b121fc-dcad-64f6-d94b-a2f8a1e16f8b}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.Timeline", "Unity.Timeline.csproj", "{75938cc8-f2a3-116f-17cf-96b867241c41}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.TextMeshPro", "Unity.TextMeshPro.csproj", "{1e9d8133-b3c0-17bd-0e56-d1d2e01d3482}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.Timeline.Editor", "Unity.Timeline.Editor.csproj", "{1ab14fdb-60c7-f132-d25e-208624437cc6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEditor.TestRunner", "UnityEditor.TestRunner.csproj", "{dc10e17c-24dc-35bd-a8db-a688248033af}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEditor.UI", "UnityEditor.UI.csproj", "{40bef3b2-29b8-ac71-3915-c13baaf77135}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.VisualStudio.Editor", "Unity.VisualStudio.Editor.csproj", "{8643a316-aa09-b962-622b-b4547b9ef234}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.TextMeshPro.Editor", "Unity.TextMeshPro.Editor.csproj", "{a488b018-47ab-0d4a-57db-ae71fc1ffc22}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.VSCode.Editor", "Unity.VSCode.Editor.csproj", "{0ba6f64d-cd0e-cd39-bf03-c711232cae16}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.Rider.Editor", "Unity.Rider.Editor.csproj", "{d7d2fb5a-e54f-260f-35b8-1d3c97282b93}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor", "Assembly-CSharp-Editor.csproj", "{e4dec26b-e93c-15bf-eee8-f9adcfbd04ee}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.TextMeshPro.Editor.Tests", "Unity.TextMeshPro.Editor.Tests.csproj", "{6bdbdb39-5a80-4492-acd3-8b700a755b9d}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DocCodeExamples", "DocCodeExamples.csproj", "{4b325826-e0dd-47d6-1a68-151553920d3a}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEngine.UI.Tests", "UnityEngine.UI.Tests.csproj", "{ec0cce37-9382-0e79-9616-1072748078aa}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.TextMeshPro.Tests", "Unity.TextMeshPro.Tests.csproj", "{e97e0ef1-1a92-d21b-83a5-830a21626c32}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEditor.UI.EditorTests", "UnityEditor.UI.EditorTests.csproj", "{11f94b24-59b9-02c4-d19d-acc017bb8762}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-firstpass", "Assembly-CSharp-firstpass.csproj", "{53b18ac0-d048-92cf-8d96-c9ae9f80cfbf}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8c128bad-74c4-c0bb-b048-a5cf73a38375}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8c128bad-74c4-c0bb-b048-a5cf73a38375}.Debug|Any CPU.Build.0 = Debug|Any CPU
{c5df9f86-3e35-0f6e-0780-12c348a8f8b9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{c5df9f86-3e35-0f6e-0780-12c348a8f8b9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{c8b121fc-dcad-64f6-d94b-a2f8a1e16f8b}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{c8b121fc-dcad-64f6-d94b-a2f8a1e16f8b}.Debug|Any CPU.Build.0 = Debug|Any CPU
{75938cc8-f2a3-116f-17cf-96b867241c41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{75938cc8-f2a3-116f-17cf-96b867241c41}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1e9d8133-b3c0-17bd-0e56-d1d2e01d3482}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1e9d8133-b3c0-17bd-0e56-d1d2e01d3482}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1ab14fdb-60c7-f132-d25e-208624437cc6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1ab14fdb-60c7-f132-d25e-208624437cc6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{dc10e17c-24dc-35bd-a8db-a688248033af}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{dc10e17c-24dc-35bd-a8db-a688248033af}.Debug|Any CPU.Build.0 = Debug|Any CPU
{40bef3b2-29b8-ac71-3915-c13baaf77135}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{40bef3b2-29b8-ac71-3915-c13baaf77135}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8643a316-aa09-b962-622b-b4547b9ef234}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8643a316-aa09-b962-622b-b4547b9ef234}.Debug|Any CPU.Build.0 = Debug|Any CPU
{a488b018-47ab-0d4a-57db-ae71fc1ffc22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{a488b018-47ab-0d4a-57db-ae71fc1ffc22}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0ba6f64d-cd0e-cd39-bf03-c711232cae16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0ba6f64d-cd0e-cd39-bf03-c711232cae16}.Debug|Any CPU.Build.0 = Debug|Any CPU
{d7d2fb5a-e54f-260f-35b8-1d3c97282b93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{d7d2fb5a-e54f-260f-35b8-1d3c97282b93}.Debug|Any CPU.Build.0 = Debug|Any CPU
{e4dec26b-e93c-15bf-eee8-f9adcfbd04ee}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{e4dec26b-e93c-15bf-eee8-f9adcfbd04ee}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6bdbdb39-5a80-4492-acd3-8b700a755b9d}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6bdbdb39-5a80-4492-acd3-8b700a755b9d}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4b325826-e0dd-47d6-1a68-151553920d3a}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4b325826-e0dd-47d6-1a68-151553920d3a}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ec0cce37-9382-0e79-9616-1072748078aa}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ec0cce37-9382-0e79-9616-1072748078aa}.Debug|Any CPU.Build.0 = Debug|Any CPU
{e97e0ef1-1a92-d21b-83a5-830a21626c32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{e97e0ef1-1a92-d21b-83a5-830a21626c32}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11f94b24-59b9-02c4-d19d-acc017bb8762}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{11f94b24-59b9-02c4-d19d-acc017bb8762}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53b18ac0-d048-92cf-8d96-c9ae9f80cfbf}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53b18ac0-d048-92cf-8d96-c9ae9f80cfbf}.Debug|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
Expand Down

0 comments on commit cd3bf45

Please sign in to comment.