"The input is not a valid Base-64 string" when calling Members.Login
Hi.
I'm trying to log our members in using the following code
Members.Login("jurian360", "password");
However this keeps throwing the following error:
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.
I am running Umbraco version 7.7.7 assembly: 1.0.6554.23584.
Thanks, this was my exact issue as well!
Took a look at my created member in the backoffice and realised the "Last Password Change Date" property was empty.
I too came across this problem today. To add to the above, this error will throw when the user doesn't have a password.
In my case, MemberService.SavePassword was correctly throwing an error (the password didn't meet criteria) so trying to login to this user threw the error.
"The input is not a valid Base-64 string" when calling Members.Login
Hi. I'm trying to log our members in using the following code
However this keeps throwing the following error:
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.
I am running Umbraco version 7.7.7 assembly: 1.0.6554.23584.
The only other similar thread I could find was http://issues.umbraco.org/issue/U4-10752 but did not provide a solution for us.
Looking forward to your help.
Check out the encryption options for Umbraco passwords. In the DB, you can either store passwords as "plain text" or "encrypted".
I believe "encrypted" stores them as a base-64 encoded URI (although there may be a hash involved, too).
A work-around might be to simply check that their password matches, then log them in manually:
Thanks for your input.
I've been able to narrow it down further: It seems to only be a problem when I assign the password in code
If I assign the password via the normal Umbraco back-end, I am able to log in fine.
Furthermore, I have tried assigning the password via .CreateWithIdentity. This gives the exact same result.
Ok. It seems this was just a logical error on my part. I was calling .SavePassword before I had saved the member. All seems ok now.
Ah. Thanks! This helped me solve the same issue.
Thanks, this was my exact issue as well! Took a look at my created member in the backoffice and realised the "Last Password Change Date" property was empty.
I too came across this problem today. To add to the above, this error will throw when the user doesn't have a password.
In my case,
MemberService.SavePassword
was correctly throwing an error (the password didn't meet criteria) so trying to login to this user threw the error.is working on a reply...