Skip to content

Commit 6b321c1

Browse files
Fix/state token mismatch (#126)
* Log state token error more plainly with what we got * Fix order of when we generate state token * Don't reveal state token in mismatch log * Increment package version * Increment package version
1 parent f050aa8 commit 6b321c1

File tree

4 files changed

+13
-27
lines changed

4 files changed

+13
-27
lines changed

Assets/Sequence/SequenceSDK/Authentication/OpenIdAuthenticator.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ public void AppleSignIn()
196196

197197
private string GenerateState(LoginMethod method)
198198
{
199+
_stateToken = Guid.NewGuid().ToString();
199200
string state = $"{_urlScheme + "---" + _stateToken + method}";
200201
return state;
201202
}
@@ -215,9 +216,7 @@ private string GenerateSignInUrl(string baseUrl, string clientId, string state)
215216
#if UNITY_IOS
216217
RedirectUrl = $"{ReverseClientId(clientId)}://";
217218
#endif
218-
219-
_stateToken = Guid.NewGuid().ToString();
220-
219+
221220
string url =
222221
$"{baseUrl}?response_type=code+id_token&client_id={clientId}&redirect_uri={RedirectUrl}&nonce={_sessionId}&scope=openid+email&state={state}/";
223222
if (PlayerPrefs.HasKey(LoginEmail))

Assets/StreamingAssets.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "xyz.0xsequence.waas-unity",
3-
"version": "2.8.1",
3+
"version": "2.8.2",
44
"displayName": "Sequence Embedded Wallet SDK",
55
"description": "A Unity SDK for the Sequence WaaS API",
66
"unity": "2021.3",

ProjectSettings/EditorBuildSettings.asset

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,11 @@ EditorBuildSettings:
88
- enabled: 1
99
path: Assets/Sequence/Samples/DemoScene/Demo.unity
1010
guid: d87896574aa4f42aab6b98685b555474
11-
- enabled: 0
12-
path:
13-
guid: 00000000000000000000000000000000
1411
- enabled: 0
1512
path: Assets/Sequence/SequenceSDK/WaaS/Tests/EndToEnd/WaaSEndToEndTests.unity
1613
guid: 6a48e95d2401d41339a9d99c129ae1f9
17-
- enabled: 0
18-
path: Assets/Sequence/SequenceExamples/Scenes/Tests.unity
14+
- enabled: 1
15+
path: Assets/Sequence/SequenceFrontend/Scenes/Tests.unity
1916
guid: 4dfb06a7c845a4513907bd9b1a335575
20-
- enabled: 0
21-
path:
22-
guid: 00000000000000000000000000000000
23-
- enabled: 0
24-
path:
25-
guid: 00000000000000000000000000000000
26-
- enabled: 0
27-
path:
28-
guid: 00000000000000000000000000000000
29-
- enabled: 0
30-
path:
31-
guid: 00000000000000000000000000000000
32-
- enabled: 0
33-
path:
34-
guid: 00000000000000000000000000000000
35-
- enabled: 0
36-
path:
37-
guid: 00000000000000000000000000000000
3817
m_configObjects:
3918
com.unity.addressableassets: {fileID: 11400000, guid: 05a489a8ff904294fbd5aaeffa1a14d3, type: 2}

0 commit comments

Comments
 (0)