Skip to content

Commit e70df30

Browse files
committed
Checking if the cached email value is empty to avoid having the 'login_hint' inside the sign-in url
1 parent 51aa5eb commit e70df30

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Packages/Sequence-Unity/Sequence/SequenceSDK/Authentication/OpenIdAuthenticator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ private string GenerateSignInUrl(string baseUrl, string clientId, string state)
231231

232232
string url =
233233
$"{baseUrl}?response_type=code+id_token&client_id={clientId}&redirect_uri={_redirectUrl}&scope=openid+email&state={state}/";
234-
if (PlayerPrefs.HasKey(LoginEmail))
234+
235+
if (PlayerPrefs.HasKey(LoginEmail) && !string.IsNullOrEmpty(PlayerPrefs.GetString(LoginEmail)))
235236
{
236237
url = url.RemoveTrailingSlash() + $"&login_hint={PlayerPrefs.GetString(LoginEmail)}".AppendTrailingSlashIfNeeded();
237238
url = url.Replace(" ", "");

0 commit comments

Comments
 (0)