kennethreitz/flask-googlefed — Issue #1: Post login results in redirect loop
Author: johnsheehan
Created: 2012-03-07 22:20:24+00:00
State: open

fresh flask project with only flask-googlefed installed running locally. Using the example code after I am redirected to google and successfully auth it returns me back to local site but ends up in endless redirect. here's the console output (domain substituted for example.com):

* Running on http://127.0.0.1:5000/
127.0.0.1 - - [07/Mar/2012 14:14:10] "GET / HTTP/1.1" 302 -
127.0.0.1 - - [07/Mar/2012 14:14:11] "GET /login/?next=http%3A%2F%2F127.0.0.1%3A5000%2F HTTP/1.1" 302 -
127.0.0.1 - - [07/Mar/2012 14:14:19] "GET /login/?next=http://127.0.0.1:5000/&openid_complete=yes&janrain_nonce=2012-03-07T22%3A14%3A11ZkLlU8Q&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Fa%2Fexample.com%2Fo8%2Fud%3Fbe%3Do8&openid.response_nonce=2012-03-07T22%3A14%3A18ZHaqFUnxBSL_sCg&openid.return_to=http%3A%2F%2F127.0.0.1%3A5000%2Flogin%2F%3Fnext%3Dhttp%3A%2F%2F127.0.0.1%3A5000%2F%26openid_complete%3Dyes%26janrain_nonce%3D2012-03-07T22%253A14%253A11ZkLlU8Q&openid.assoc_handle=AMlYA9WN6MFUPDhI3ZqYr5Bu3FiZjy_abpDatD9YCTagPTzxdkiK24NN&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle&openid.sig=0iSF2CsuogcrKUGGo3UfdKFtd%2Fs%3D&openid.identity=http%3A%2F%2Fexample.com%2Fopenid%3Fid%3D115461435729675941350&openid.claimed_id=http%3A%2F%2Fexample.com%2Fopenid%3Fid%3D115461435729675941350 HTTP/1.1" 302 -
127.0.0.1 - - [07/Mar/2012 14:14:19] "GET /login/?next=http://127.0.0.1:5000/ HTTP/1.1" 302 -
127.0.0.1 - - [07/Mar/2012 14:14:20] "GET /login/?next=http://127.0.0.1:5000/&openid_complete=yes&janrain_nonce=2012-03-07T22%3A14%3A19Z8ipHBq&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Fa%2Fexample.com%2Fo8%2Fud%3Fbe%3Do8&openid.response_nonce=2012-03-07T22%3A14%3A19ZK9PTD-onLSpXbg&openid.return_to=http%3A%2F%2F127.0.0.1%3A5000%2Flogin%2F%3Fnext%3Dhttp%3A%2F%2F127.0.0.1%3A5000%2F%26openid_complete%3Dyes%26janrain_nonce%3D2012-03-07T22%253A14%253A19Z8ipHBq&openid.assoc_handle=AMlYA9WN6MFUPDhI3ZqYr5Bu3FiZjy_abpDatD9YCTagPTzxdkiK24NN&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle&openid.sig=6ArnveNYUatwNTETz3fkmXXSKf8%3D&openid.identity=http%3A%2F%2Fexample.com%2Fopenid%3Fid%3D115461435729675941350&openid.claimed_id=http%3A%2F%2Fexample.com%2Fopenid%3Fid%3D115461435729675941350 HTTP/1.1" 302 -
127.0.0.1 - - [07/Mar/2012 14:14:20] "GET /login/?next=http://127.0.0.1:5000/ HTTP/1.1" 302 -
127.0.0.1 - - [07/Mar/2012 14:14:21] "GET /login/?next=http://127.0.0.1:5000/&openid_complete=yes&janrain_nonce=2012-03-07T22%3A14%3A20ZyS2iaC&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Fa%2Fexample.com%2Fo8%2Fud%3Fbe%3Do8&openid.response_nonce=2012-03-07T22%3A14%3A20ZOc9UZMrZeXgR5A&openid.return_to=http%3A%2F%2F127.0.0.1%3A5000%2Flogin%2F%3Fnext%3Dhttp%3A%2F%2F127.0.0.1%3A5000%2F%26openid_complete%3Dyes%26janrain_nonce%3D2012-03-07T22%253A14%253A20ZyS2iaC&openid.assoc_handle=AMlYA9WN6MFUPDhI3ZqYr5Bu3FiZjy_abpDatD9YCTagPTzxdkiK24NN&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle&openid.sig=FMiNhj6GozXkRh237p7AT5IivkA%3D&openid.identity=http%3A%2F%2Fexample.com%2Fopenid%3Fid%3D115461435729675941350&openid.claimed_id=http%3A%2F%2Fexample.com%2Fopenid%3Fid%3D115461435729675941350 HTTP/1.1" 302 -
127.0.0.1 - - [07/Mar/2012 14:14:21] "GET /login/?next=http://127.0.0.1:5000/ HTTP/1.1" 302 -
127.0.0.1 - - [07/Mar/2012 14:14:22] "GET /login/?next=http://127.0.0.1:5000/&openid_complete=yes&janrain_nonce=2012-03-07T22%3A14%3A21ZLFDmwX&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Fa%2Fexample.com%2Fo8%2Fud%3Fbe%3Do8&openid.response_nonce=2012-03-07T22%3A14%3A21Z0FLPaGVjf-WC_g&openid.return_to=http%3A%2F%2F127.0.0.1%3A5000%2Flogin%2F%3Fnext%3Dhttp%3A%2F%2F127.0.0.1%3A5000%2F%26openid_complete%3Dyes%26janrain_nonce%3D2012-03-07T22%253A14%253A21ZLFDmwX&openid.assoc_handle=AMlYA9WN6MFUPDhI3ZqYr5Bu3FiZjy_abpDatD9YCTagPTzxdkiK24NN&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle&openid.sig=L3BJc1QyZ9zng1ecjg4JeDQJf7s%3D&openid.identity=http%3A%2F%2Fexample.com%2Fopenid%3Fid%3D115461435729675941350&openid.claimed_id=http%3A%2F%2Fexample.com%2Fopenid%3Fid%3D115461435729675941350 HTTP/1.1" 302 -
127.0.0.1 - - [07/Mar/2012 14:14:22] "GET /login/?next=http://127.0.0.1:5000/ HTTP/1.1" 302 -
127.0.0.1 - - [07/Mar/2012 14:14:23] "GET /login/?next=http://127.0.0.1:5000/&openid_complete=yes&janrain_nonce=2012-03-07T22%3A14%3A22Zrm1Uht&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Fa%2Fexample.com%2Fo8%2Fud%3Fbe%3Do8&openid.response_nonce=2012-03-07T22%3A14%3A22ZOzCxQXEssDFSfQ&openid.return_to=http%3A%2F%2F127.0.0.1%3A5000%2Flogin%2F%3Fnext%3Dhttp%3A%2F%2F127.0.0.1%3A5000%2F%26openid_complete%3Dyes%26janrain_nonce%3D2012-03-07T22%253A14%253A22Zrm1Uht&openid.assoc_handle=AMlYA9WN6MFUPDhI3ZqYr5Bu3FiZjy_abpDatD9YCTagPTzxdkiK24NN&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle&openid.sig=P2MwLZEw2cB8BEZSI04KBA5fKy0%3D&openid.identity=http%3A%2F%2Fexample.com%2Fopenid%3Fid%3D115461435729675941350&openid.claimed_id=http%3A%2F%2Fexample.com%2Fopenid%3Fid%3D115461435729675941350 HTTP/1.1" 302 -
127.0.0.1 - - [07/Mar/2012 14:14:23] "GET /login/?next=http://127.0.0.1:5000/ HTTP/1.1" 302 -

Any ideas?