0
!!私は、Djangoの11.1にoauth2client
ドキュメントから次のビューを実装:ジャンゴ&Googleの認証エラー400(のOAuth2エラー)が1
@oauth_required
def get_profile_required(request):
resp, content = request.oauth.http.request(
'https://www.googleapis.com/plus/v1/people/me')
return HttpResponse(content)
@oauth_enabled
def get_profile_optional(request):
if request.oauth.has_credentials():
# this could be passed into a view
# request.oauth.http is also initialized
return HttpResponse('User email: {}'.format(
request.oauth.credentials.id_token['email']))
else:
return HttpResponse(
'Here is an OAuth Authorize link:<a href="{}">Authorize</a>'
.format(request.oauth.get_authorize_redirect()))
そして、私がしようとするとページが正しく動作しているように見えますが、流れを通って、私はそれがError: redirect_uri_mismatch
だと言って400のエラーを取得します。私は自分のドメインを鍵の資格証明セクションに追加しようとしましたが、私はそれを見つけることができません。ここに私が見ているもののスクリーンショットがあります:
私は他の場所で見るべきですか?これは権限の問題ですか?