I'm working on a python GAE app for a web site and I'm trying to get federated login going on it.
According to the Identity Platform choosing guide the best solution for a web site appears to be the Google Identity Toolkit (web). Went through all the related docs I could find then moved on to the tutorials, where I hit a bump - installing the identity-toolkit-python-client
package failed with C compilation errors related to a cffi library, similar to this one:
# python -m pip install identity-toolkit-python-client
...
gcc -pthread -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I/usr/include/python2.7 -c src/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_a269d620xd5c405b7.c -o build/temp.linux-x86_64-2.7/src/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_a269d620xd5c405b7.o
src/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_a269d620xd5c405b7.c:2:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
I managed to eventually install the package correctly after installing some specific packages for my linux distribution, but these failures lead to my actual question (the tutorials are pretty generic, I couldn't spot any hint about GAE restrictions).
From the GAE python sandbox documentation only pure python code is supposed to be present in GAE apps:
All code for the Python runtime environment must be pure Python, and not include any C extensions or other code that must be compiled.
I don't see the identity toolkit included in the GAE SDK or its 3rd party libraries, which as far as I understand means I'd have to install it as a 3rd party library in my own app. But the pure python code restriction applies to these libs as well:
You can add any third-party library to your application, as long as it is implemented in "pure Python" (no C extensions) and otherwise functions in the App Engine runtime environment.
Hence the question in the title.
Am I missing something?
Thanks.
So far I'm using webapp2 and jinja2.