Google / Firebase身份验证无iOS的displayName或photoURL [英] Google/Firebase Authentication no displayName or photoURL for iOS
问题描述
我正在使用Ionic2和
config.xml
<?xml version ='1.0' 'UTF-8' >?;
< widget id =com.ionicframework.XXXXXXXversion =0.0.1xmlns =http://www.w3.org/ns/widgetsxmlns:cdv =http:// cordova .apache.org / NS / 1.0\" >
<名称> TheWhoZoo< / name>
它还有 REVERSED_CLIENT_ID
上面的iOS URL方案
。
< plugin name =cordova- plugin-googleplusspec =〜5.1.1>
< variable name =REVERSED_CLIENT_IDvalue =com.googleusercontent.apps.XXXXXX/>
< / plugin>
我还创建了一个 Firebase App
我的项目也有匹配的 Bundle ID
(不知道这是否有任何作用):
另外,我不确定这是否有所作为,但我添加了 问题 是否有任何步骤丢失或做了错误的设置为 添加提取配置文件数据所需的作用域: 查看官方 documentation 和插件 documentation 。 范围描述为这里。 I am using Ionic2 and GooglePlus Authentication. I can sign in and it creates a User with a When I do this: Where the Problem: However, for More Info: I do have an config.xml And it also has the I have also created a Also, I am not sure if this makes any difference, but I add the the Question Are there any steps I am missing or doing something wrong to set this up for This should add the required scope for fetching profile data: See the official documentation and the plugin documentation for details. The scope is described here. 这篇关于Google / Firebase身份验证无iOS的displayName或photoURL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! CLIENT_ID
对于
iOS
转换为Google Firebase身份验证:
iOS
?
window.plugins.googleplus.login({$ b $'scopes':'https://www.googleapis.com/auth/plus.me',
// continue以下...
$ b uid
in the Firebase Authentication
list as expected. GooglePlus.login({
'webClientId': webClientId,
'offline': true
}).then(googleData => {
webClientId
matches the Client ID
in the iOS Credential
below.iOS
, the googleData
does contain an emailAddress
and uid
, but the displayName
and photoURL
are null
.iOS Credential
set up with the Bundle ID
matching the widget id
in the config.xml
:<?xml version='1.0' encoding='utf-8'?>
<widget id="com.ionicframework.XXXXXXX" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>theWhoZoo</name>
REVERSED_CLIENT_ID
matching the iOS URL scheme
above.<plugin name="cordova-plugin-googleplus" spec="~5.1.1">
<variable name="REVERSED_CLIENT_ID" value="com.googleusercontent.apps.XXXXXX" />
</plugin>
Firebase App
for my Project that also has the matching Bundle ID
(not sure if this has any effect):CLIENT_ID
for iOS
to the Google Firebase Authentication here:iOS
?window.plugins.googleplus.login({
'scopes': 'https://www.googleapis.com/auth/plus.me',
// continue below...