0

I'm attempting to implement the GITKit in a Asp .NET Web Api 2 application. I followed the instructions on the google developer kit. When I go to my sign in page, it redirects to accountchooser.com. So far, so good. I have a google account shown, so I select it. The page reloads, but it is completely blank. No call is received on my sign in successful url. The javascript console shows:

Uncaught Error: At least one sign in option should be specified! gitkit.js:250

Any ideas? What am I doing wrong? How does one debug the various calls to see where things are going haywire? Thanks.

Jim Jenkins
  • 123
  • 1
  • 2
  • 6

1 Answers1

0

in your sign in html page where window.google.identitytoolkit.start() is called, you need to pass a configuration object to the start() method with signInOptions defined. Below is an example:

<script type="text/javascript" src="//www.gstatic.com/authtoolkit/js/gitkit.js"></script>
<link type="text/css" rel="stylesheet" href="//www.gstatic.com/authtoolkit/css/gitkit.css" />
<script type="text/javascript">
  var config = {
      apiKey: '...',
      signInSuccessUrl: '/',
      signInOptions: ["google", "password"]
  };
  window.google.identitytoolkit.start(
      '#gitkitWidgetDiv', // accepts any CSS selector
      config);
</script>
Jin Liu
  • 2,203
  • 15
  • 13
  • Yes, I have that code. The problem occurs after they select an account in account chooser. – Jim Jenkins Aug 25 '15 at 13:07
  • When the browser shows a blank page after the user select an account from accountchooser.com, can you dump the html source of the blank page and paste here (you may remove the apiKey)? – Jin Liu Aug 25 '15 at 21:51