带有分析服务器的Apple SignIn

问题描述 投票:0回答:1

我的应用程序托管在sashido.io上,该服务器提供Parse Server托管。由于这是必需的,因此我正在尝试为我的应用程序实现Apple SignIn。第一步,我将以下代码添加到我的应用中。 Apple SignIn工作正常,我获得了令牌和ID,但是无法使用此数据创建“解析用户”。这是我的iOS代码:

var authData = [String: String]()
authData["id"] = id
authData["token"] = token
PFUser.logInWithAuthType(inBackground: "apple", authData: authData).continueWith(block: {
    task -> Void in
       ...
})

我已验证authData正确包含ID和令牌。不幸的是,我收到内部服务器错误作为响应{"code":1,"message":"Internal server error."}

[之后,我像这样修改了index.js文件的以下部分,并将其推送到sashido。不幸的是,这没有任何改变,并且我仍然收到内部服务器错误。

var api = new ParseServer(
{
    databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
    appId: process.env.APP_ID || 'myAppId',
    masterKey: process.env.MASTER_KEY || 'masterKey',
    serverURL: process.env.SERVER_URL || 'http://localhost:' + port + '/1',

    // If you change the cloud/main.js to another path
    // it wouldn't work on SashiDo :( ... so Don't change this.
    cloud: process.env.CLOUD_CODE_MAIN || 'cloud/main.js',

    auth: {
       apple: {   
          client_id: process.env.IOS_BUNDLE_ID
       }
    },

    liveQuery: {
        classNames: []
    },
});
javascript ios parse-platform parse-server
1个回答
0
投票
Sashido支持的最新版本是3.6.0,但是他们尚未添加对使用Apple登录的支持。请参阅以下来自3.6.0上app settings > users > social login的屏幕截图...

sashido dashboard screenshot

[还请注意,编辑index.js文件并将其推送到您的私有Sashido GitHub存储库不会更改Parse Server配置。该设施仅用于本地开发。

[我建议您与Sashido联系,并要求他们增加对使用Apple登录的支持-最好在Parse Server 4.2.0上,这样您将获得最新的改进。

© www.soinside.com 2019 - 2024. All rights reserved.