title: How to get p12 file working on python app engine
body: <p>Im having trouble getting identity-toolkit fully working with Python App Engine Sandbox. The <a href="https://github.com/googlesamples/identity-toolkit-python" rel="nofollow">sample provided</a> is for a non GAE Sandbox project. </p>
  
  <p>In the sample project it reads <code>gitkit-server-config.json</code> from file using <code>os.path</code>. But this is not supported in GAE Sandbox. To get around this I am creating a GitkitClient directly using the constructor:</p>
  
  <pre><code>gitkit_instance = gitkitclient.GitkitClient(
      client_id="123456opg.apps.googleusercontent.com",
      service_account_email="my-project@appspot.gserviceaccount.com",
      service_account_key="/path/to/my-p12file.p12",
      widget_url="http://localhost:8080/callback",
      http=None,
      project_id="my-project")
  </code></pre>
  
  <p>Is this the correct way to create the GitkitClient?</p>
  
  <p>The issue now is when I try to do a password reset when running locally using <code>dev_appserver.py</code> I get the following stack trace:</p>
  
  <pre><code> File "dashboard.py", line 89, in post
      oobResult = gitkit_instance.GetOobResult(self.request.POST,self.request.remote_addr)
    File "identitytoolkit/gitkitclient.py", line 366, in GetOobResult
      param['action'])
    File "identitytoolkit/gitkitclient.py", line 435, in _BuildOobLink
      code = self.rpc_helper.GetOobCode(param)
    File "identitytoolkit/rpchelper.py", line 104, in GetOobCode
      response = self._InvokeGitkitApi('getOobConfirmationCode', request)
    File "identitytoolkit/rpchelper.py", line 210, in _InvokeGitkitApi
      access_token = self._GetAccessToken()
    File "identitytoolkit/rpchelper.py", line 231, in _GetAccessToken
      'assertion': self._GenerateAssertion(),
    File "identitytoolkit/rpchelper.py", line 259, in _GenerateAssertion
      crypt.Signer.from_string(self.service_account_key),
    File "oauth2client/_pure_python_crypt.py", line 183, in from_string
      raise ValueError('No key could be detected.')
  ValueError: No key could be detected.
  </code></pre>
  
  <p>Im assuming this is a problem with the .p12 file? I double checked <code>service_account_key="/path/to/my-p12file.p12"</code> and the file exists. What am I missing here?</p>