The packages I have installed
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Markdown" version="1.14.3" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="2.0.30506.0" targetFramework="net45" />
<package id="Nancy" version="1.4.0" targetFramework="net45" />
<package id="Nancy.Authentication.Forms" version="1.4.0" targetFramework="net45" />
<package id="Nancy.Hosting.Self" version="1.4.0" targetFramework="net45" />
<package id="Nancy.Metadata.Modules" version="1.4.0" targetFramework="net45" />
<package id="Nancy.SimpleAuthentication" version="0.4" targetFramework="net45" />
<package id="Nancy.Viewengines.Razor" version="1.4.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="RestSharp" version="105.2.3" targetFramework="net45" />
<package id="SimpleAuthentication.Core" version="0.4" targetFramework="net45" />
</packages>
I login with Google, and it redirects me back just fine (woo)!
Next it hits this bit of code in the CallbackProvider just fine
return nancyModule.LoginWithoutRedirect(authorizationResult.UserId);
but my web browser remains on a blank page of:
/authentication/authenticatecallback?providerkey=google…blahblahblah
I open another tab and try access an admin page (thinking maybe the Redirect just failed), but am faced with an error 500!
Nancy.RequestExecutionException: Oh noes! ---> System.FormatException: Invalid length for a Base-64 char array or string.
at System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength)
at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)
at System.Convert.FromBase64String(String s)
at Nancy.Authentication.Forms.FormsAuthentication.DecryptAndValidateAuthenticationCookie(String cookieValue, FormsAuthenticationConfiguration configuration)
at Nancy.Authentication.Forms.FormsAuthentication.GetAuthenticatedUserFromCookie(NancyContext context, FormsAuthenticationConfiguration configuration)
at Nancy.Authentication.Forms.FormsAuthentication.<>c__DisplayClass7.b__6(NancyContext context)
at Nancy.BeforePipeline.<>c__DisplayClass4.b__3(NancyContext ctx, CancellationToken ct)
--- End of inner exception stack trace ---
at Nancy.NancyEngine.InvokeOnErrorHook(NancyContext context, ErrorPipeline pipeline, Exception ex)
The error is coming from the SimpleAuthentication code inside the DecryptAndValidateAuthenticationCookie method, when trying to execute ConvertFromBase64String() on the value stored in the cookie.
This happens 100% of the time for me, I am curious if you have any ideas what it may be?
The packages I have installed
I login with Google, and it redirects me back just fine (woo)!
Next it hits this bit of code in the
CallbackProviderjust finebut my web browser remains on a blank page of:
/authentication/authenticatecallback?providerkey=google…blahblahblahI open another tab and try access an admin page (thinking maybe the Redirect just failed), but am faced with an error 500!
The error is coming from the SimpleAuthentication code inside the
DecryptAndValidateAuthenticationCookiemethod, when trying to executeConvertFromBase64String()on the value stored in the cookie.This happens 100% of the time for me, I am curious if you have any ideas what it may be?