【问题标题】:Couchbase openIDConnect Authentication iosCouchbase openIDConnect 身份验证 ios
【发布时间】:2017-12-30 10:51:12
【问题描述】:

我正在尝试使用 couchbase 数据库并使用授权代码流为其设置身份验证。我按照link 中的步骤操作。我相应地准备了 ConfigJson。使用 Pods 我为 ios 安装了 Couchbase lite 并通过以下方式提供了身份验证器:

let url = URL.init(string: "http://my-ip:4984/project_name/_oidc")!
pusher = database.createPushReplication(url)
pusher.continuous = true
let authenticator = CBLAuthenticator.openIDConnect({(loginURL: URL, redirectURL: URL, Nonnull: CBLOIDCLoginContinuation) -> Void in

                    print(loginURL,redirectURL)
                })
                pusher.authenticator = authenticator
                pusher.start()

但是当我在终端中检查它时,“http://my-ip:4984/project_name/_oidc/_session”被击中,我没有收到任何对手机的回调。我究竟做错了什么?对不起,我只是一个初学者。为什么最后加了_session?

【问题讨论】:

    标签: ios couchbase-lite couchbase-sync-gateway


    【解决方案1】:

    您需要设置数据库的 URL 而不是设置 _oidc 端点。身份验证步骤由 Couchbase Lite 的 Open ID Connect 身份验证器负责。

    所以,你需要使用 let url = URL.init(string: "http://my-ip:4984/project_name/")!

    【讨论】:

    • 感谢您的回复。如果它是正确的,我会试试这个并给你赏金
    猜你喜欢
    • 2016-09-20
    • 2019-01-27
    • 2020-10-14
    • 2020-07-06
    • 2021-08-19
    • 2021-12-21
    • 2021-03-16
    • 2018-07-03
    • 1970-01-01
    相关资源
    最近更新 更多