jeffdgr8 / kotbase

Kotlin Multiplatform library for Couchbase Lite—a lightweight, embedded, syncable, NoSQL database
https://kotbase.dev
Apache License 2.0
64 stars 1 forks source link

OpenID Connect (OIDC) Support #27

Open prvaghasiya opened 6 months ago

prvaghasiya commented 6 months ago

Thank you for starting this project. Does this support OpenID Connect (OIDC) auth?

jeffdgr8 commented 6 months ago

Yes, Couchbase Sync Gateway supports OIDC authentication and Kotbase supports the Couchbase Lite replicator API to authenticate with a session ID.

The basic steps are:

1) Configure your Sync Gateway with your OIDC provider. 2) Create a session ID with a OIDC token. 3) Get the session ID from the response header or created cookie. 4) Use the session ID to authenticate from the client replicator using session authentication. 5) Refresh the session ID when it expires.

Also see this tutorial and these blog posts: