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.

Thanks.
Ian

Seems I need to get better at searching Google!

http://developer.couchbase.com/documentation/mobile/1.3/guides/authentication/openid/google/index.html

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": "http://myserverurl.com:8091",
     "oidc": {
       "default_provider":"google",
       "providers": {
         "google": {
           "issuer": "https://accounts.google.com",
           "client_id": "10088asd234-59g9uqhn7kal53rmvt9dg9u659optv3d.apps.googleusercontent.com",
           "validation_key": "AIzafsdfsdfsdfVQk_Vqvv0g8TKSpT7IZSRWc6w9Tr3U",
           "callback_url": "http://myserverurl.com:4984/databasename/_oidc_callback",
           "register": true
               "disable_session" : true
         }
       }
    },

When I enter the URL:
https://myserverurl.com/databasename/_oidc

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

@ian.bradbury

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.

Andy