Help needed with openID Authentication in iOS

15 views
Skip to first unread message

Bharath Reddy Gangannagari

unread,
Jan 4, 2018, 3:42:48 PM1/4/18
to Couchbase Mobile
I am trying to authenticate using openID Connect in iOS. We are using our own provider instead of depending on Google or other providers. Here is the code i used for authentication:


            let database = try manager?.existingDatabaseNamed(dbName)

            let pullRepl = database?.createPullReplication(URL.init(string: "<URL>")!)

            pullRepl?.continuous = true

            let callback = OpenIDController.loginCallback()

            pullRepl?.authenticator = CBLAuthenticator.openIDConnect({ (url, redirectUrl, loginContinuation) in

                print(url,redirectUrl,loginContinuation)

            })

     

            NotificationCenter.default.addObserver(self, selector: #selector(replicationProgress(notification:)),

                                                   name: NSNotification.Name.cblReplicationChange, object: pullRepl)

            pullRepl?.start()


It is hitting the server but I am not getting any callback and url hit is "MYURL/_server". Why is _server appended? Authentication is working correctly from browser. Do i need to add something else to the code? 

Reply all
Reply to author
Forward
0 new messages