Comments (12)
OK I guess this happens when trying to initiateAuth using an email which hasn't been verified yet.
The fix for me is to specify email_verified = true
on user creation, then the SRP authentication works as intended.
Not sure if any action needs to be taken to handle that particular case, otherwise I can close this
from aws-sdk-net-extensions-cognito.
Thanks for the feedback. I'll look into whether we can use the signed salt values. I don't want to recommend setting email_verified = true
unless it has been verified or isn't critical for you.
from aws-sdk-net-extensions-cognito.
Getting the same issue. However, do not want to set email_verified as true as I need to log in to obtain a session from which I can call ResponseToNewPasswordRequiredAsync in order to change the temporary password (and confirm the email)
from aws-sdk-net-extensions-cognito.
Having the same issue where I use Email as UserName for not activated accounts. This way I can't response to challenge and require to validate Email by providing validation code in next step.
from aws-sdk-net-extensions-cognito.
I have email_verified as true and I'm getting the same issue
from aws-sdk-net-extensions-cognito.
Getting this issue as well on a user that has been verified and has been able to log in prior.
Edit: This is when a user doesn't exist on the database. So what I think may be happening is that a user has an email such as "[email protected]", and is also using "[email protected]". This is the only thing that separates between this format exception and an unknown user error, and the format issue is because the salt hex is negative.
Stack trace below
at System.Numerics.BigNumber.ParseBigInteger (System.ReadOnlySpan'1[T] value, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) [0x0001e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.Runtime.Numerics/src/System/Numerics/BigNumber.cs:386
at System.Numerics.BigNumber.ParseBigInteger (System.String value, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.Runtime.Numerics/src/System/Numerics/BigNumber.cs:374
at System.Numerics.BigInteger.Parse (System.String value, System.Globalization.NumberStyles style, System.IFormatProvider provider) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs:675
at System.Numerics.BigInteger.Parse (System.String value, System.Globalization.NumberStyles style) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs:665
at Amazon.Extensions.CognitoAuthentication.Util.BigIntegerExtensions.FromUnsignedLittleEndianHex (System.String hex) [0x0000b] in <bfb077a8c7a341ef900f115d002a1c51>:0
at Amazon.Extensions.CognitoAuthentication.Util.AuthenticationHelper.AuthenticateUser (System.String username, System.String password, System.String poolName, System.Tuple`2[T1,T2] tupleAa, System.String saltString, System.String srpbString, System.String secretBlockBase64, System.String formattedTimestamp) [0x0003b] in <bfb077a8c7a341ef900f115d002a1c51>:0
at Amazon.Extensions.CognitoAuthentication.CognitoUser.CreateSrpPasswordVerifierAuthRequest (Amazon.CognitoIdentityProvider.Model.InitiateAuthResponse challenge, System.String password, System.Tuple`2[T1,T2] tupleAa) [0x000a8] in <bfb077a8c7a341ef900f115d002a1c51>:0
at Amazon.Extensions.CognitoAuthentication.CognitoUser.StartWithSrpAuthAsync (Amazon.Extensions.CognitoAuthentication.InitiateSrpAuthRequest srpRequest) [0x000f2] in <bfb077a8c7a341ef900f115d002a1c51>:0
<ommited project specific stack>
from aws-sdk-net-extensions-cognito.
Hi @efess,
Good afternoon.
I was going through the issue backlog and came across this issue. I tested the functionality and it appears that StartWithSrpAuthAsync()
works when a verified email address (e.g. [email protected]) having special character _
, is used in place of user name. Also, for un-verified email address, I didn't got any parse exception, it didn't allowed me to login with an invalid username/password exception.
AWSSDK.Extensions.CognitoAuthentication Version: 0.9.4
Please confirm if we could close this issue.
Thanks,
Ashish
from aws-sdk-net-extensions-cognito.
@ashishdhingra the issue is when you try to initiate auth using an email address which has not been verified yet. This will throw an exception within the library rather than any useful information telling the user that the email address needs to be verified first.
Edit: If it's not reproducible, please close it. I'm off the project which I originally experienced this issue so I cannot test myself.
from aws-sdk-net-extensions-cognito.
Hi @timcromarty / @dtarczynski / @vazquezbonilla / @DevonHansen,
Good afternoon.
Please review the above comments and let me know if this is still an issue. Else, since the issue is not reproducible, we could close this issue.
Thanks,
Ashish
from aws-sdk-net-extensions-cognito.
This seems to have fixed itself for me overnight. I don't manage our Cognito instance so can't say for certain if something has changed there.
I was previously testing with [email protected]
and password
and getting the FormatException
, but now getting NotAuthorizedException
as you'd expect.
from aws-sdk-net-extensions-cognito.
I'll look to see if I can replicate sometime today. We have a workaround where we assume that FormatException is a reason to not log the person in for invalid details.
from aws-sdk-net-extensions-cognito.
This issue has not recieved a response in 2 weeks. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.
from aws-sdk-net-extensions-cognito.
Related Issues (20)
- There doesn't appear to be an ability to use UserContextData HOT 2
- CognitoUser.ListDevicesAsync() doesn't support returning pagination token. HOT 4
- `CognitoAuthHelper.GetAssemblyFileVersion` Expensive CPU Wise HOT 5
- Async methods should ALWAYS accept an optional cancellation token HOT 4
- Tag NuGet release commits HOT 2
- Include pdb and xml in NuGet package HOT 2
- Version 2.4.1 throws MissingMethodException when used with SignInManager HOT 4
- Refresh Token error - SecretHash does not match for the client HOT 9
- StartWithSrpAuthAsync Not Sync Safe HOT 9
- Verification codes other than the first one are not working HOT 4
- Unable to re-authenticate (not refresh) using the same device key HOT 7
- Avoid checking _access_ token expiry when trying to refresh access via a refresh token. HOT 7
- Recent change to use DateTime.UtcNow was a breaking change (at least for our application) HOT 11
- Custom Authentication Flow with SRP Password Verification HOT 7
- Extensions CognitoAuthentication Documentation HOT 4
- A deadlock occurs with Android and C# when trying to create a provider with Amazon.CognitoIdentityProvider.AmazonCognitoIdentityProviderClient HOT 5
- Invalid Refresh Token when using Refresh Token with Device Tracking HOT 7
- NotAuthorizedException: SecretHash does not match for the client: xxxxxxxxxxxxxxxxxxx when trying refresh token flow HOT 4
- Missing Authentication Token when trying to use ListUsersRequest HOT 2
- UserNotConfirmedException - how to resend confirmation code for not completed signup in .NET HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-sdk-net-extensions-cognito.