Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Couchbase openIDConnect身份验证ios_Ios_Couchbase Lite_Couchbase Sync Gateway - Fatal编程技术网

Couchbase openIDConnect身份验证ios

Couchbase openIDConnect身份验证ios,ios,couchbase-lite,couchbase-sync-gateway,Ios,Couchbase Lite,Couchbase Sync Gateway,我正在尝试使用couchbase DB,并使用授权代码流为其设置身份验证。我遵循了这个步骤。我相应地准备好了。我使用Pods安装了Couchbase lite for ios,并以以下方式提供了验证器: let url = URL.init(string: "http://my-ip:4984/project_name/_oidc")! pusher = database.createPushReplication(url) pusher.continuous = true let authen

我正在尝试使用couchbase DB,并使用授权代码流为其设置身份验证。我遵循了这个步骤。我相应地准备好了。我使用Pods安装了Couchbase lite for ios,并以以下方式提供了验证器:

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()

但当我在手机中查看时,终端“”被点击,我没有收到手机的任何回调。我做错了什么?对不起,我只是个初学者。为什么要在末尾添加_session?

您需要设置数据库的URL,而不是设置_oidc端点。认证步骤由Couchbase Lite的开放ID连接验证器完成


因此,您需要使用let
url=url.init(字符串:http://my-ip:4984/project_name/")!

谢谢您的回复。我会试试这个,如果是对的,我会给你赏金