I'm working on an application using OpenId connect implicit flow with Auth0 provider. I'm already able to get the JWT token from Auth0, and now want to start a session in Couchbase sync gateway.
For that, I do a POST to /{db}/_session
which return me a cookie with SyncGatewaySession
id. From what I understand, this should be associated with a user in sync gateway web interface ... However I see no user created.
So, is there a way to see which user I use for replication ?
Or a way to make sure my JWT token is correctly read by sync gateway ?
EDIT When I disable the GUEST user by setting the following in my config file,
"users": {
"GUEST": {
"disabled": true,
"admin_channels": [
"*"
]
}
}
my OpenId doesn't seem to access sync. I guess it means I use GUEST user unknowingly.
So. How can I have my OpenID user created as a distinct user from GUEST one ?
There are errors (and missing points) in Couchbase Sync gateway documentation for OpenId Connect implicit flow.
validation_key
defined in Sync Gateway config file.Authorization
and the value prefix Bearer
.register
must be set to true in config fileWith all those errors corrected, I finally had my users and sessions correctly created, and my couchbase lite data correctly replicated, even when users initially didn't exist.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With