OpenID Authentication example for iOS Swift?

Does anyone know of an example / tutorial on how to implement OpenID authentication with a service like Google?

I’m developing for iOS in Swift.

I can see the documentation - but I’m just having trouble understanding.

Any pointers greatly received.


Seems I need to get better at searching Google!

Nope. I wish I was making progress.

All I’m getting is the message.
“OpenID Connect not configured for database”

I’ve followed the various clippings of code. But I’m failing.

I’ve set up Google and have all the API keys.
I’ve updated sync_gateway config.json to include a section like this…

 "databases": {
   "databasename": {
     "server": "",
     "oidc": {
       "providers": {
         "google": {
           "issuer": "",
           "client_id": "",
           "validation_key": "AIzafsdfsdfsdfVQk_Vqvv0g8TKSpT7IZSRWc6w9Tr3U",
           "callback_url": "",
           "register": true
               "disable_session" : true

When I enter the URL:

All I get is the message “OpenID Connect not configured for database”


I ran up Sync Gateway with your config and oidc was correctly configured.

Are you testing with the latest sync_gateway release (1.3.1)?

You can validate that your config is indeed being loaded by sync_gateway by calling:

curl -X GET http://localhost:4985/_config

The config sync_gateway is running with is returned in the response.