diff --git a/Gotrue/Gotrue.csproj b/Gotrue/Gotrue.csproj index 8235777..b33c242 100644 --- a/Gotrue/Gotrue.csproj +++ b/Gotrue/Gotrue.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.1 true Supabase.Gotrue Supabase.Gotrue diff --git a/Gotrue/Helpers.cs b/Gotrue/Helpers.cs index 646e438..bcee01b 100644 --- a/Gotrue/Helpers.cs +++ b/Gotrue/Helpers.cs @@ -29,11 +29,10 @@ public static string GenerateNonce() { // ReSharper disable once StringLiteralTypo const string chars = "abcdefghijklmnopqrstuvwxyz123456789"; - var random = new Random(); var nonce = new char[128]; for (var i = 0; i < nonce.Length; i++) { - nonce[i] = chars[random.Next(chars.Length)]; + nonce[i] = chars[RandomNumberGenerator.GetInt32(0, chars.Length)]; } return new string(nonce);