Yes I had followed the guide for custom login, aka.
- with a standalone server to check credential,
- and if succeeded, query the sync gateway server to fetch session id from sync gateway server
- send the fetched session id to the device
Though I mistakenly fogotten to set configuration in the sync_gateway configuration js file. I forgot to set the guest property to disabled. After I disable the guest property, everything works like a charm.
So I deleted the post because that was an obvious mistake, but somehow the google groups won't let me.
Anyway, thanks Jens! You've been really helpful and quick responding.
-Sean