Making it easier to use the google-auth library in App Engine
See original GitHub issueI had to jump through a number of hoops to get the requests transport working in the App Engine environment:
- Enable billing for the project
- Vendor in the requests-toolbelt library and enable the monkeypatch (as documented here)
- Add the
ssl
library to the app.yaml:
libraries:
- name: ssl
version: latest
- Enable sockets as documented here
Only by doing all the above, that I could get the HTTPS request to Google OAuth2 token servers working. Is this to be expected? Is there anything that can be done to make using this library in App Engine easier?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:16 (9 by maintainers)
Top Results From Across the Web
Google Auth Library: Node.js Client
This library provides an implementation of Application Default Credentialsfor Node.js. The Application Default Credentials provide a simple ...
Read more >Authentication — google-api-core documentation
If you're running in Compute Engine or App Engine, authentication should “just work”. If you're developing locally, the easiest way to authenticate is...
Read more >Using OAuth 2.0 with the Google API Client Library for Java
Overview. Purpose: This document explains how to use the GoogleCredential utility class to do OAuth 2.0 authorization with Google services.
Read more >google.auth.app_engine module - Read the Docs
This module provides authentication and signing for applications running on App Engine in the standard environment using the App Identity API.
Read more >Create a Flask Application With Google Login - Real Python
In fact, even the library you'll be using to make OAuth 2 and OIDC easier is usable in any Python code. In other...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, I have the following in
appengine_config.py
:I managed to resolve the module loading issue by using the following instead:
It would be nice if I could avoid having to do this though.
I had the same
ImportError
withgoogle.auth
ondev_appserver
as @hiranya911, whose workaround also fixed it for me.@jonparrott Regarding the
google.__path__
manipulations, I noticed that the following line was indeed necessarywhilst the following alternative didn’t solve the problem