Forums

Flask OpenID not logging in.

Hi, I am new to web dev, and struggling to get OpenID authentication working on PythonAnywhere. It works on my local machine without issue, and I am using github to sync my files between the two. myapp is at inyoka.pythonanywhere.com

I have checked the error log and there doesn't seem to be any error. Thought I would ask before trying to delete the webapp and recreating.

Any help really appreciated, Simon

I would suggest adding some logging to your views so you can see what your code is doing. Check things like server responses and so on at key points to identify where the problem is.

Thank you, enabling logging led me to understand that the logs were looking in the wrong place ./mysite/tmp/, not ./tmp as they do on my local machine, which led to me changing the following init.py line :

from : oid = OpenID(app, os.path.join(basedir, 'tmp'))
to : oid = OpenID(app, os.path.join(basedir, 'mysite/tmp'))

This helped me remove all my errors, but OpenID is still not authenticating, my research led me to the following post... https://www.pythonanywhere.com/forums/topic/502/#id_post_8109

Which indicates OpenID will not work through a free accounts. There is a possible answer here, but I do not understand how to implement this : http://stackoverflow.com/questions/12212294/using-google-openid-behind-a-proxy-server

Anyway I will decide on how I will tackle this on Monday. Either I will remove authentication until the app is complete, or change to Oauth which I am less confident with.

Thank you for the prod in the right direction.