redirect_uri的参数值无效 [英] Invalid parameter value for redirect_uri

查看:141
本文介绍了redirect_uri的参数值无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试通过Web在Google Plus中对我的应用进行身份验证时,出现错误消息:

When i try to authenticate my app in Google Plus via Web i get an error:

错误:invalid_requestredirect_uri的参数值无效:缺少权限:MY_APP:/oauth2callback

我按照说明进行了所有操作:
https://developers.google.com/+/mobile/ios/getting-started

I did everything according to the instructions:
https://developers.google.com/+/mobile/ios/getting-started

但是,使用Google Plus应用程序进行身份验证可以正常运行.有什么问题吗?

However, authentication with Google Plus application runs fine. What's the problem?

推荐答案

我遇到了同样的问题,因为我使用的是非常规的包ID

I encountered the same problem because I was using an unconventional bundle id

即它的格式不是com.company.appname

i.e it was not in the format com.company.appname

我在这里找到了解决方案. https://code.google.com/p/google-plus-platform/issues/detail?id = 961

I found the solution here. https://code.google.com/p/google-plus-platform/issues/detail?id=961

您必须添加signIn.useClientIDForURLScheme = YES;

you have to add signIn.useClientIDForURLScheme = YES;

GPPSignIn *signIn = [GPPSignIn sharedInstance];
signIn.shouldFetchGooglePlusUser = YES;
signIn.clientID = kClientId;
signIn.scopes = @[ kGTLAuthScopePlusLogin ];
signIn.delegate = self;
signIn.useClientIDForURLScheme = YES;

,然后更改您的目标->信息->网址类型->网址方案客户ID的点反向属性.

and then change your target->info->url types->url schemes property to the dot reverse of your client id.

例如

client id = 2299995859-8gt63glaqk4o8l3ouge3nf1qb2h1vyg3.apps.googleusercontent.com
url schema = com.googleusercontent.apps.2299995859-8gt63glaqk4o8l3ouge3nf1qb2h1vyg3

这篇关于redirect_uri的参数值无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆