create_login_url raise NotAllowedError

GAEでGoogleAppsにインストールできるPythonアプリを作っていて、OpenIDでシングルサインオンさせようとしているが、users.create_login_urlでNotAllowedErrorが発生する。

なぜだろう?と思って「GAE NotAllowedError」で検索してみるが、このエラーで苦しんだケースは皆2年ほど前の古いケースで、自分の場合にはあてはまらないようだった。

2時間ほど考えて、やっと気がついた。原因は、GAEの管理コンソール「Application Settings」の「Authentication Options」が「Google Accounts API」になっている事だった。正しくは、ここは「(Experimental) Federated Login」でなければならない。

Leave a Reply

Your email address will not be published. Required fields are marked *