天蓝色的谷歌签到显示空白的白页

时间:2017-07-19 11:53:44

标签: angularjs cordova azure ionic-framework google-signin

以下是我使用azure登录的代码。

我已经设置了使用谷歌登录所需的一切,包括我的授权回拨网址

https://myAzureSite.azurewebsites.net/.auth/login/google/callback

和授权的javascript起源

https://myAzureSite.azurewebsites.net

我也按照说明启用了社交api,并将客户端ID和客户端密码放入google的azure身份验证设置中。内容安全策略元标记也在我的索引文件中。

在研究了一些后,我在我的应用程序日志中发现了这个错误......输入无效

申请日志

2017-07-19T16:09:28  Welcome, you are now connected to log-streaming service.
2017-07-19T16:09:36  PID[5300] Critical    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.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 Microsoft.Azure.AppService.Authentication.ModuleUtils.ParseKeyString(String keyString)
   at Microsoft.Azure.AppService.Authentication.CryptoHelper.get_Default()
   at Microsoft.Azure.AppService.Authentication.IdentityProviderBase.<RedirectToLoginPageAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.AppService.Authentication.IdentityProviderBase.<TryHandleProtocolRequestAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.Azure.AppService.Authentication.EasyAuthModule.<OnBeginRequestAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.AppService.Authentication.HttpModuleDispatcher.<DispatchAsync>d__13.MoveNext()
2017-07-19T16:09:36  PID[5300] Information Sending response: 500.79 Internal Server Error
2017-07-19 16:09:03 SCANNIN GET /.auth/login/google session_mode=token&X-ARR-LOG-ID=a0c71b7f-1ba1-4c70-b28e-053c0e2792ac 443 - 205.185.209.163 Mozilla/5.0+Google ARRAffinity=9d2a904ebce60f45ea468ce406b610510a42678c8d3f0cd761756aef31b3c514 - scannin.azurewebsites.net 500 79 2147500037 329 1039 15
2017-07-19 16:09:10 ~1SCANNIN GET /Microsoft.Mobile.Management/tables api-version=2014-11-01&_=1500480350552&X-ARR-LOG-ID=4340640e-40e4-40ea-97c0-dd4ead98d0ce 443 - 70.37.57.58 Mozilla/5.0+(Macintosh;+Intel+Mac+OS+X+10_12_5)+AppleWebKit/603.2.4+(KHTML,+like+Gecko)+Version/10.1.1+Safari/603.2.4 - https://management.azure.com/subscriptions/bd5771bb-237c-4508-bf66-419541298fd0/resourceGroups/ScanIn/providers/Microsoft.Web/sites/ScannIn/extensions/Microsoft.Mobile.Management/tables?api-version=2014-11-01&_=1500480350552 scannin.scm.azurewebsites.net 200 0 0 1715 2611 31

登录代码

 client.login("google").done(function (results) {
     alert("You are now logged in as: " + results.userId);
}, function (err) {
     alert("Error: " + err);
});

Error image

1 个答案:

答案 0 :(得分:0)

我的愚蠢错误,过去一个月我一直在尝试为我的应用程序添加自定义身份验证,但无济于事。在此过程中,我为我的应用程序设置添加了一个网站签名密钥。这就是导致错误的原因。