pallets-eco / flask-openid Goto Github PK
View Code? Open in Web Editor NEWFlask-OpenID adds openid support to flask applications
License: Other
Flask-OpenID adds openid support to flask applications
License: Other
example/example.py needs to be ported to Python 3.
I have this error with python3 :
ValueError: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.
It happens when I use try_login('...').
(null)
i run the example in my computer,but it prompt:Error fetching XRDS document: <urlopen error [Errno -5] No address associated with hostname> after input 'xkk' or '[email protected]' and sign in.
my flask-openid.db have two records like this:
1|wdd|[email protected]|8899
2|xkk|[email protected]|3432
Why am I getting this error, and how do I fix it?
Couldn't get the example to work on windows 7 until I changed
DATABASE_URI = 'sqlite:////tmp/flask-openid.db',
to
DATABASE_URI = 'sqlite:///tmp/flask-openid.db',
One less slash
https://developers.google.com/+/api/auth-migration#timetable
Is this something that can be handled via Flask-OpenID?
http://paste.ubuntu.com/7008471
openssl version
0.9.8y 5 Feb 2013
OpenSSL.version == 0.14
Any ideas what I am doing wrong?
The example.py - oid.try_login line - gives me openid invalid when i enter a gmail id (yahoo ids do get me to the yahoo webpage). I am on a windows box, and I inserted some print statements in the try_login function -- and found that "except discover.DiscoveryFailure:" was being triggered with this particular exception: <class 'openid.yadis.discover.DiscoveryFailure'>.
Any ideas what is going wrong or how to debug this?
=================> pip freeze on this win box.
flask==0.9
flask-babel==0.8
flask-cache==0.4.0
flask-mail==0.6.1
flask-principal==0.2
flask-script==0.3.1
flask-sqlalchemy==0.15
flask-testing==0.3
flask-themes==0.1.3
flask-wtf==0.5.2
Flask-OpenID==1.0.1
python-openid==2.2.5
pyOpenSSL==0.13
Hi everyone,
There is a very obvious open redirect vulnerability in the example code
On line 83 of example.py:
if g.user is not None:
return redirect(oid.get_next_url())
There are other areas in which oid.get_next_url()
is used inappropriately which would also need to be looked at.
Spammers and Phishing attacks would use the vulnerability in the following way:
www.mysite.com/login?next=www.attacker.com
The same example code is used in the documentation:
http://pythonhosted.org/Flask-OpenID/
After a successful authentication to an OpenID provider, I received an "OpenID authentication error" error message. Upon stepping through some flask-openid code, the error was due to an invalid nonce (because of my crazy system time). It might be helpful to pass the actual error message to the application instead of a generic authentication error.
PS: If you decided to pass a generic auth error because of security (attackers can identify how things are broken), then please ignore this issue.
Figure out why.
Relevant: https://github.com/mitsuhiko/flask/issues/#issue/155
We are using the Flask_OpenID package. Until recently we used version 1.2.1 under python 2.6 and that works fine.
On a new installation of our software, version 1.2.2 was automatically chosen, resulting in the following trace in one of our programs.
Traceback (most recent call last): File "/usr/local/bin/cpsconf.py", line 5, in pkg_resources.run_script('cpsdirector==1.4.1', 'cpsconf.py') File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 467, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1200, in run_script execfile(script_filename, namespace, namespace) File "/usr/local/lib/python2.6/dist-packages/cpsdirector-1.4.1-py2.6.egg/EGG-INFO/scripts/cpsconf.py", line 3, in from cpsdirector import common, db File "/usr/local/lib/python2.6/dist-packages/cpsdirector-1.4.1-py2.6.egg/cpsdirector/__init__.py", line 24, in oid = OpenID(app, safe_roots=[], extension_responses=[pape.Response]) File "/usr/local/lib/python2.6/dist-packages/Flask_OpenID-1.2.2-py2.6.egg/flask_openid.py", line 343, in __init__ if isstring(app): File "/usr/local/lib/python2.6/dist-packages/Flask_OpenID-1.2.2-py2.6.egg/flask_openid.py", line 107, in isstring if sys.version_info.major >= 3: AttributeError: 'tuple' object has no attribute 'major'
If this sounds familiar and you have a quick fix, that would be nice.
Thanks in advance,
Bert
Currently, Werkzeug 3.0.x isn't compatible with flask-openid.
File "venv/lib/python3.11/site-packages/flask_openid.py", line 23, in <module>
from werkzeug.urls import url_quote
ImportError: cannot import name 'url_quote' from 'werkzeug.urls'
it's a pretty simple fix from here: https://werkzeug.palletsprojects.com/en/2.3.x/urls/
replace the single url_quote()
call with urllib.parse.quote()
on flask_openid.py
.
I can submit a PR if you prefer me to do so :)
This page : http://packages.python.org/Flask-OpenID/
from flaskext.openid import OpenID
Should be
from flask.ext.openid import OpenID
(env)jchen@rousseau-(master|…)> pip-3.3 -V
pip 1.4.1 from /Users/jchen/git/voltaire/cs-draft/env/lib/python3.3/site-packages (python 3.3)
(env)jchen@rousseau-(master|…)> pip-3.3 install flask-openid
Downloading/unpacking flask-openid
Downloading Flask-OpenID-1.2.tar.gz (41kB): 41kB downloaded
Running setup.py egg_info for package flask-openid
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/Users/jchen/git/voltaire/cs-draft/env/build/flask-openid/setup.py", line 20
print 'Please make sure you have docs/_themes checked out while running setup.py!'
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/Users/jchen/git/voltaire/cs-draft/env/build/flask-openid/setup.py", line 20
print 'Please make sure you have docs/_themes checked out while running setup.py!'
^
SyntaxError: invalid syntax
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /Users/jchen/git/voltaire/cs-draft/env/build/flask-openid
Storing complete log in /Users/jchen/.pip/pip.log
When I submit the form, it does normally direct brower to the aol openid confirm page. But after I confirm it and redirect to http://locahost:5000/login, the application response a http 500 error to my browser.
I was wonder if it's the openid platform issue. so I move my step to using livejournal to do the test.But the error still remains the same as aol before.
Tried on both Python2.7 and Python3
Hi @potiuk, @puiterwijk, @mitsuhiko, this project is currently part of @pallets-eco, but we do not have access to it on PyPI. You can add me as an owner (davidism) and I can transfer it into the pallets-eco PyPI org.
Has anyone tried this codebase on python 3 yet? How much work is it to port it to 3?
When viewing the public docs I see that the import code sample still displays from flask.ext.openid import OpenID
.
It appears that the latest code on main
contains the correct import statement: from flask_openid import OpenID
.
I'm not sure how your docs get built and published but it appears something has gone awry.
Under: http://packages.python.org/Flask-OpenID/#how-to-use
"Alternatively the object can be instanciated without the application in which case it can later be registered for an application with the init_app() method."
The proper spelling is "instantiated".
Regards,
dave
This package checks the installed version programatically and it is not compatible with poetry as mentionned here: python-poetry/poetry#1287
Could the lib use dependency markers instead which follows PEP-508.
Functions try_login and loginhandler has different instances of association store:
def try_login(self, identity_url, ask_for=None):
...
try:
consumer = Consumer(session, self.store_factory())
def loginhandler(self, f):
...
consumer = Consumer(session, self.store_factory())
That's ok if association store is persistent but with in-memory store that gives a bug, as after exiting try_login store instance is garbage collected.
I was planning on using this library for some project, but I see there is not activity, issues without response and pull request without approval or denial, is this library dead?
Hi there,
I did a quick search and found issue #50, where there was a misunderstanding due to a cross reference GitHub automatically made.
Would you consider merging the changes from https://github.com/canonical-web-and-design/flask-openid here, so stateless operation is supported?
Thank you in advance
I gave the server's own address as OpenID to a single-threaded server and flask locked up. The same thing if I create a firewall rule to drop some packages.
I was unable to retrieve any stack from flask on keyboard interrupt.
This is rather easy to use to perform a DoS attack: the attacker has to setup a server that drops all incoming packets on a certain port and give it's URL as and OpenID provider. If environment is not single-threaded, they just have to repeat it enough times to exhaust the thread pool.
I'm new to both OpenID and python-openid. This should be solved by using asynchronous mode in discovery, if there is such a thing in python-openid. I'll look into it, but I will appreciate it if the wiser people give me some advice.
Hello,
I'd like to write some unit tests for my app when using flask-openid but the Flask test client doesn't allow for external redirects. Any good workarounds? FYI, I've posted this question on http://stackoverflow.com/questions/21655601/flask-openid-unittest as well but I didn't get any attempts at an answer :(
Hi,
I am new to Flask and OpenID. I was trying to flask-openid in App Engine.
Followed the tutorial http://pythonhosted.org/Flask-OpenID/ and used GAE datastore to store information during authentication process. I used 'gaestore.py' and 'gaemodels.py' from https://code.google.com/p/djapps/source/browse/#hg%2Fdjapps%2Fauth%2Fopenid to store data in GAE datastore. It required some modifications in
flask_openid.py and gaestore.py.
Reproduction procedure:--
Download code from 'https://github.com/rajendrakrp/GAE-Flask-OpenID' and development server by issuing following command inside the app:
dev_appserver.py --port=9090 .
Follow the steps:--
The problem is - it should not redirect to localhost:9090, according to code, it should redirect to page 'create_profile.html'. This is because session data 'openid' stored in 'create_or_login()' function is not retained when control goes to 'create_profile()' function. I have added necessary debug steps also. Please verify.
Please let me know if you need more information. I tried to explain as much possible. I didn't get any reponse from stackoverflow also(http://stackoverflow.com/questions/16075126/using-flask-openid-in-app-engine).
Thanks in advance.
Just working on Python 3 and new version Flask. Flask-OpenID:
Traceback (most recent call last):
File "D:/Dropbox/Python/Statsmile/app.py", line 10, in
from flask_openid import OpenID
File "C:\Python33\lib\site-packages\flask_openid.py", line 24, in
from openid.store.filestore import FileOpenIDStore
File "C:\Python33\lib\site-packages\openid__init__.py", line 52, in
if len(version_info) != 3:
TypeError: object of type 'map' has no len()
file init.py:
try:
version_info = map(int, __version__.split('.'))
except ValueError:
version_info = (None, None, None)
else:
if len(version_info) != 3:
version_info = (None, None, None)
else:
version_info = tuple(version_info)
Is there a solution?
Prompt the openid was invalid when logging in with sign in,How to register with example.py
Following the instructions to run the example, I get:
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'flask.ext'
Dependencies:
Flask==1.1.2
Flask-OpenID==1.2.5
python3-openid==3.2.0
$ tox -e py27
GLOB sdist-make: /Users/bwstitt/code/python-openid/setup.py
py27 inst-nodeps: /Users/bwstitt/code/python-openid/.tox/dist/python-openid-2.2.5.zip
py27 runtests: PYTHONHASHSEED='480270221'
py27 runtests: commands[0] | ./run_tests.sh
EE..................................................................................................................................................................................................EEEEE.................................................................................................................................E.......EEE..................................................................................................................................................................................E......................................................................................
----------------------------------------------------------------------
Ran 29 tests in 0.005s
OK
.......................................................................................................F.F....F.F..................................................................................E..........................................................
----------------------------------------------------------------------
Ran 17 tests in 0.006s
OK
.
======================================================================
ERROR: Failure: ImportError (No module named djopenid.server)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/loader.py", line 420, in loadTestsFromName
addr.filename, addr.module)
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/Users/bwstitt/code/python-openid/examples/djopenid/server/tests.py", line 3, in <module>
from djopenid.server import views
ImportError: No module named djopenid.server
======================================================================
ERROR: Failure: TypeError (__init__() takes exactly 5 arguments (2 given))
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/loader.py", line 525, in makeTest
return self._makeTest(obj, parent)
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/loader.py", line 572, in _makeTest
return self.loadTestsFromTestCase(obj)
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/loader.py", line 496, in loadTestsFromTestCase
return super(TestLoader, self).loadTestsFromTestCase(testCaseClass)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 56, in loadTestsFromTestCase
loaded_suite = self.suiteClass(map(testCaseClass, testCaseNames))
TypeError: __init__() takes exactly 5 arguments (2 given)
======================================================================
ERROR: openid.test.test_consumer.TestDiffieHellmanResponseParameters.testAbsentMacKey
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/case.py", line 381, in setUp
try_run(self.inst, ('setup', 'setUp'))
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/util.py", line 471, in try_run
return func()
File "/Users/bwstitt/code/python-openid/openid/test/test_consumer.py", line 1927, in setUp
self.secret = cryptutil.randomString(self.session_cls.secret_size)
AttributeError: 'NoneType' object has no attribute 'secret_size'
======================================================================
ERROR: openid.test.test_consumer.TestDiffieHellmanResponseParameters.testAbsentServerPublic
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/case.py", line 381, in setUp
try_run(self.inst, ('setup', 'setUp'))
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/util.py", line 471, in try_run
return func()
File "/Users/bwstitt/code/python-openid/openid/test/test_consumer.py", line 1927, in setUp
self.secret = cryptutil.randomString(self.session_cls.secret_size)
AttributeError: 'NoneType' object has no attribute 'secret_size'
======================================================================
ERROR: openid.test.test_consumer.TestDiffieHellmanResponseParameters.testExtractSecret
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/case.py", line 381, in setUp
try_run(self.inst, ('setup', 'setUp'))
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/util.py", line 471, in try_run
return func()
File "/Users/bwstitt/code/python-openid/openid/test/test_consumer.py", line 1927, in setUp
self.secret = cryptutil.randomString(self.session_cls.secret_size)
AttributeError: 'NoneType' object has no attribute 'secret_size'
======================================================================
ERROR: openid.test.test_consumer.TestDiffieHellmanResponseParameters.testInvalidBase64MacKey
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/case.py", line 381, in setUp
try_run(self.inst, ('setup', 'setUp'))
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/util.py", line 471, in try_run
return func()
File "/Users/bwstitt/code/python-openid/openid/test/test_consumer.py", line 1927, in setUp
self.secret = cryptutil.randomString(self.session_cls.secret_size)
AttributeError: 'NoneType' object has no attribute 'secret_size'
======================================================================
ERROR: openid.test.test_consumer.TestDiffieHellmanResponseParameters.testInvalidBase64Public
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/case.py", line 381, in setUp
try_run(self.inst, ('setup', 'setUp'))
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/util.py", line 471, in try_run
return func()
File "/Users/bwstitt/code/python-openid/openid/test/test_consumer.py", line 1927, in setUp
self.secret = cryptutil.randomString(self.session_cls.secret_size)
AttributeError: 'NoneType' object has no attribute 'secret_size'
======================================================================
ERROR: Failure: ImportError (No module named lxml)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/loader.py", line 420, in loadTestsFromName
addr.filename, addr.module)
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/Users/bwstitt/code/python-openid/openid/test/test_examples.py", line 10, in <module>
import twill.commands
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/twill/__init__.py", line 52, in <module>
from shell import TwillCommandLoop
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/twill/shell.py", line 9, in <module>
from twill import commands, parse, __version__
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/twill/commands.py", line 7, in <module>
from lxml import html
ImportError: No module named lxml
======================================================================
ERROR: openid.test.test_fetchers.test_fetcher
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
TypeError: test_fetcher() takes exactly 3 arguments (0 given)
======================================================================
ERROR: openid.test.test_fetchers.run_fetcher_tests
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
TypeError: run_fetcher_tests() takes exactly 1 argument (0 given)
======================================================================
ERROR: openid.test.test_fetchers.test
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/bwstitt/code/python-openid/openid/test/test_fetchers.py", line 211, in test
server = HTTPServer((host, port), FetcherTestHandler)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 420, in __init__
self.server_bind()
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
SocketServer.TCPServer.server_bind(self)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 434, in server_bind
self.socket.bind(self.server_address)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
gaierror: [Errno 8] nodename nor servname provided, or not known
======================================================================
ERROR: Failure: TypeError (__init__() takes exactly 4 arguments (2 given))
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/loader.py", line 525, in makeTest
return self._makeTest(obj, parent)
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/loader.py", line 572, in _makeTest
return self.loadTestsFromTestCase(obj)
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/loader.py", line 496, in loadTestsFromTestCase
return super(TestLoader, self).loadTestsFromTestCase(testCaseClass)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 56, in loadTestsFromTestCase
loaded_suite = self.suiteClass(map(testCaseClass, testCaseNames))
TypeError: __init__() takes exactly 4 arguments (2 given)
======================================================================
ERROR: Failure: TypeError (__init__() takes exactly 4 arguments (2 given))
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/loader.py", line 525, in makeTest
return self._makeTest(obj, parent)
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/loader.py", line 572, in _makeTest
return self.loadTestsFromTestCase(obj)
File "/Users/bwstitt/code/python-openid/.tox/py27/lib/python2.7/site-packages/nose/loader.py", line 496, in loadTestsFromTestCase
return super(TestLoader, self).loadTestsFromTestCase(testCaseClass)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 56, in loadTestsFromTestCase
loaded_suite = self.suiteClass(map(testCaseClass, testCaseNames))
TypeError: __init__() takes exactly 4 arguments (2 given)
======================================================================
FAIL: Check that when an OpenID 1 response exceeds the OpenID 1
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bwstitt/code/python-openid/openid/test/test_server.py", line 636, in test_id_res_OpenID1_exceeds_limit
self.failIf(response.renderAsForm())
AssertionError: True is not false
======================================================================
FAIL: Check that when an OpenID 2 response exceeds the OpenID 1
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bwstitt/code/python-openid/openid/test/test_server.py", line 563, in test_id_res_OpenID2_POST
self.failUnless(response.renderAsForm())
AssertionError: False is not true
======================================================================
FAIL: test_browserWithReturnTo_OpenID1_exceeds_limit (openid.test.test_server.TestProtocolError)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bwstitt/code/python-openid/openid/test/test_server.py", line 106, in test_browserWithReturnTo_OpenID1_exceeds_limit
self.failUnless(e.whichEncoding() == server.ENCODE_URL)
AssertionError: False is not true
======================================================================
FAIL: test_browserWithReturnTo_OpenID2_POST (openid.test.test_server.TestProtocolError)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bwstitt/code/python-openid/openid/test/test_server.py", line 87, in test_browserWithReturnTo_OpenID2_POST
self.failUnless(e.whichEncoding() == server.ENCODE_HTML_FORM)
AssertionError: False is not true
----------------------------------------------------------------------
Ran 815 tests in 1.632s
FAILED (errors=13, failures=4)
ERROR: InvocationError: '/Users/bwstitt/code/python-openid/run_tests.sh'
_______________________________________________________ summary ________________________________________________________
ERROR: py27: commands failed
Might be worth setting up travis-ci or something similar to automate test runs
Hello,
In every flask-openid usage example so far I've noticed that successful login handler (decorated with @oid.after_login) always redirects to URL with a hash symbol at the end, for example:
http://localhost:5000/#
In one very specific situation involving CKEditor this is causing some problems:
http://ckeditor.com/forums/CKEditor/Scrolling-problem-when-using-empty-anchor-in-URL
Is there any way to prevent hash from being added to redirect URL or is there a particular reason for such behaviour? Not sure if this is related to flask-openid or the flask framework itself, but any feedback would be appreciated.
Traceback (most recent call last):
File "/home/krik/repo/web/flask/examples/flaskr/flask/app.py", line 1780, in call
return self.wsgi_app(environ, start_response)
File "/home/krik/repo/web/flask/examples/flaskr/flask/app.py", line 1764, in wsgi_app
with self.request_context(environ):
File "/home/krik/repo/web/flask/examples/flaskr/flask/ctx.py", line 282, in enter
self.push()
File "/home/krik/repo/web/flask/examples/flaskr/flask/ctx.py", line 246, in push
self.session = self.app.open_session(self.request)
File "/home/krik/repo/web/flask/examples/flaskr/flask/app.py", line 828, in open_session
return self.session_interface.open_session(self, request)
File "/home/krik/repo/web/flask/examples/flaskr/flask/sessions.py", line 275, in open_session
s = self.get_signing_serializer(app)
File "/home/krik/repo/web/flask/examples/flaskr/flask/sessions.py", line 272, in get_signing_serializer
signer_kwargs=signer_kwargs)
TypeError: init() got an unexpected keyword argument 'signer_kwargs'
Not sure why, and if it is a openid setup or flask problem
See: pallets/flask#421
Is openid connect authentication/authorisation supported? If not, are they plans to incorporate it? Thanks.
flask-openid build failed.
error in Flask-OpenID setup command: use_2to3 is invalid.
dependency:
setuptools: 58.0.2
From setuptools v58.0.0, the use_2to3
option is no longer sopported.
pypa/setuptools@9f75850
Flask-OpenID ships the OpenID logo in example/_static/openid.png. However, it's license is unclear. Could you please clarify its license in the LICENSE file?
(I found some talk about an OpenID trademark policy that has been worked on in 2009, but I'm unable to find anything specific at all.)
The whole _themes folder is simply absent in the last release.
archtester flask-openid # ls /mnt/gen2/TmpDir/portage/dev-python/flask-openid-1.1/work/Flask-OpenID-1.1/docs/
conf.py index.rst make.bat Makefile _static
archtester flask-openid # ls /mnt/gen2/TmpDir/portage/dev-python/flask-openid-1.0.1/work/Flask-OpenID-1.0.1/docs/
conf.py index.rst make.bat Makefile _static _themes
A user in gentoo has filed a bug accordingly since the docs now fail the build from its own Makefile.
Please re-add and don't ask me to do a corresponding pull request.
I cannot post an answer in #11 so starting a new thread here: I'm encountering this exact same issue right now ("SSL certificate problem: unable to get local issuer certificate") with Steam OpenID. No idea what's happening, been working fine since always and started to get this error since this afternoon.
@davidism proposes to move this repository to the @pallets-eco org. Since I'm no longer the only person involved in this I figured I start a discussion here about doing that.
@potiuk, @potiuk, @puiterwijk: any thoughts on this issue? I prefer this not being under my username since I don't really do anything with it any more, but given where things are right now I figured I not do something without bringing this up with you.
pkg_resources is missing when you use flask with virtualenv, GAE and appfy recipe.
Not sure whose fault is this, but if flaskext/init.py contains code like this, it solves many issues:
try:
import('pkg_resources').declare_namespace(name)
except:
pass
on tag:v1.2.5 of master branch, it gets this exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/flask/app.py", line 1836, in call
return self.wsgi_app(environ, start_response)
File "/Library/Python/2.7/site-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/Library/Python/2.7/site-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/Library/Python/2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/Library/Python/2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Library/Python/2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Library/Python/2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/Library/Python/2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File "/Users/jesse/software/flask-openid/example/example.py", line 136, in create_profile
db_session.commit()
File "/Library/Python/2.7/site-packages/sqlalchemy/orm/scoping.py", line 157, in do
return getattr(self.registry(), name)(_args, *_kwargs)
File "/Library/Python/2.7/site-packages/sqlalchemy/orm/session.py", line 799, in commit
raise sa_exc.InvalidRequestError("No transaction is begun.")
InvalidRequestError: No transaction is begun.
I guess it may this:
db_session set autocommit=True
, then line 136:db_session.commit()
db_session has automatically run commit
just set autocommit=False
, this example runs well
Hello, Thanks for a great extension!
somehow i got this issue
`ERROR:root:Missing required parameter in response from https://steamcommunity.com/openid/login: ('http://specs.openid.net/auth/2.0', 'assoc_type')
Traceback (most recent call last):
File "/home/vagrant/.linuxbrew/var/pyenv/versions/venv351/lib/python3.5/site-packages/openid/message.py", line 455, in getArg
return self.args[args_key]
KeyError: ('http://specs.openid.net/auth/2.0', 'assoc_type')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/vagrant/.linuxbrew/var/pyenv/versions/venv351/lib/python3.5/site-packages/openid/consumer/consumer.py", line 1283, in _requestAssociation
assoc = self._extractAssociation(response, assoc_session)
File "/home/vagrant/.linuxbrew/var/pyenv/versions/venv351/lib/python3.5/site-packages/openid/consumer/consumer.py", line 1400, in _extractAssociation
OPENID_NS, 'assoc_type', no_default)
File "/home/vagrant/.linuxbrew/var/pyenv/versions/venv351/lib/python3.5/site-packages/openid/message.py", line 458, in getArg
raise KeyError((namespace, key))
KeyError: ('http://specs.openid.net/auth/2.0', 'assoc_type')`
Thanks.
The 'self' argument is missing.
Also, typo in the doc string: occurs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.