0
ここに私のコードは、紺碧とのサインインです。私は指示にも従っている私の認可コールバックURLを空白のグーグルサインイン空白のページを表示
https://myAzureSite.azurewebsites.net/.auth/login/google/callback
含むでGoogleの記号を使用するために必要なすべてのものを設定して、JavaScriptの起源
https://myAzureSite.azurewebsites.net
を許可した
とソーシャルAPIを有効にして、クライアントのIDとクライアントの秘密をGoogleの晴れた認証設定に入れました。コンテンツセキュリティポリシーのメタタグもインデックスファイルにあります。
いくつかのより多くの研究の後、私は...私のアプリケーションログに入力が有効
アプリケーションログ
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);
});