clownshark5503
Explore posts from serversCheckPasswordSignInAsync returns fail when password is correct
OH ok ManagerSeeder inserts a user, it doesn't do anything with create. Create does nothing because I prioritized something else and then ran into the bugs I was having problems with and now we're here. Visual Studio asked if I wanted to drop in CRUD functions for me and I went "yeah why not"
35 replies
CheckPasswordSignInAsync returns fail when password is correct
https://github.com/KevDev23/minibackend
I chunked it down, let me know if it does something wonky. Have a good weekend!
35 replies
[solved]Stuck on a The input is not a valid Base-64 string error
Truncated Stack Trace:
System.FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)
at System.Convert.FromBase64String(String s)
at Microsoft.AspNetCore.Identity.PasswordHasher
1.VerifyHashedPassword(TUser user, String hashedPassword, String providedPassword)
at Microsoft.AspNetCore.Identity.UserManager
1.VerifyPasswordAsync(IUserPasswordStore1 store, TUser user, String password)
at Microsoft.AspNetCore.Identity.UserManager
1.CheckPasswordAsync(TUser user, String password)
at Microsoft.AspNetCore.Identity.SignInManager`1.CheckPasswordSignInAsync(TUser user, String password, Boolean lockoutOnFailure)
at backendpv.Controllers.ManagerController.Login(LoginDto loginDto) in C:\Users\Kevin\source\repos\backendpv\backendpv\Controllers\ManagerController.cs:line 4011 replies
[solved]Stuck on a The input is not a valid Base-64 string error
Its supposed to check that the password given is the correct password for a given user. Under the hood it uses CheckPasswordAsync for that.
I thought the string it was talking about was loginDto.Password but encoding that into base64 didn't change anything. This is what I did to convert it.
string encoded = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(loginDto.Password));
11 replies