Page 1 of 1

No security database access

Posted: Sat Jul 08, 2017 12:28 pm
by Terry Gilliver

I have an app that doesn't require a login, therefore there is no session token. I have a database with static data which needs no security (read only). How do I access this, as when i create a database service it requires the session token.


No security database access

Posted: Sat Jul 08, 2017 1:13 pm
by Serhii Kulibaba

Hello Terry,

Please clarify, did you set the collection setting "Secure collection" = true?
Bu default, database rows are available for all users without sessionToken.

Could you please provide us with more details, screenshots or exact steps to reproduce this problem?


No security database access

Posted: Sat Jul 08, 2017 4:38 pm
by Terry Gilliver

I haven't set Secure Collection = true, but I see a header for session token in the service.

Are you saying that I can leave that setting blank?


No security database access

Posted: Sun Jul 09, 2017 6:04 am
by Serhii Kulibaba

Yes, you can leave it blank


No security database access

Posted: Tue Jul 11, 2017 8:14 pm
by Bernie

Terry,
In case you want to identify the user despite having no login required you can read the device ID of the user:

var mydevice = device.uuid;
localStorage.setItem("device_uuid", mydevice);


No security database access

Posted: Wed Jul 12, 2017 10:09 am
by Terry Gilliver

Thanks for the update Bernie.

In this situation, however, it is a completely anonymous app.