Start a new topic

Allow user requests w/o logging in

Hi! I'm trying to allow users to search my data store w/o logging in. Right now any query triggered from the Javascript library seems to require an active user. Is it possible to do this w/o giving away the master key?

Thanks in advance!

Yes, what I recommend is still creating the active user in the library, but you can do that transparent to the end-user. Basically, you would automatically create a user when `Kinvey.getActiveUser()` returns `null`.
Thank Mark! I think this could work, but wouldn't that create a lot of dummy users in the db?

I suppose I can delete these dummy users periodically, or should I attempt to reuse a single dummy user always? Any best practice recommended here?
It is fine to leave the dummy users in the database, as you don’t require any user management anyway. You can clean them up every now and then if you want to, but that shouldn’t be necessary.
Login or Signup to post a comment