SImple Stand-Alone Applicatiopn with a Local Only DataBase - Printable Version +- LiveCloud Forums (https://forums.livecloud.io) +-- Forum: General (https://forums.livecloud.io/forumdisplay.php?fid=1) +--- Forum: General (https://forums.livecloud.io/forumdisplay.php?fid=3) +--- Thread: SImple Stand-Alone Applicatiopn with a Local Only DataBase (/showthread.php?tid=297) |
SImple Stand-Alone Applicatiopn with a Local Only DataBase - clarencemartin - 01-18-2020 Can you explain how I can create a simple stand-alone application that does not use Cloud Data Storage? I know that I can do local data calls only, to the local device, but how would the user of this Local Stand-alone application by-pass the log-on? What would be the code that bypasses the need to log-in to the application and where would I put it? Can you please provide a sample? RE: SImple Stand-Alone Applicatiopn with a Local Only DataBase - efrain.c - 01-21-2020 (01-18-2020, 04:30 PM)clarencemartin Wrote: Can you explain how I can create a simple stand-alone application that does not use Cloud Data Storage? Hi Clarence, cdb_auth needs to be called regardless of cloud or local storage. Local auth will attempt to decrypt files on disk with the credentials provided. If you want the app to be completely offline, you have a couple options in this case. 1. create a shared user and give the credentials to your users. all users will use the same email and password to login 2. create a shared user and hardcode the credentials in your code The following is an example of the login process assuming you are hardcoding the credentials: Code: on openCard RE: SImple Stand-Alone Applicatiopn with a Local Only DataBase - clarencemartin - 01-21-2020 Thanks RE: SImple Stand-Alone Applicatiopn with a Local Only DataBase - stamatis - 09-06-2020 Thanks for the code @efrain.c... just to clarify, online access is required no matter if database is local or cloud? (ie you can't authenticate against local user credentials?). So if no internet access, no access to local DB? I ask because in the course of using the example login authentication generated by the auto-project, it logs events in message box: Code: (2020-09-07 16:50:37.207): Local authentication unsure: no local data to verify Which in my mind implies local authentication is possible... RE: SImple Stand-Alone Applicatiopn with a Local Only DataBase - efrain.c - 09-08-2020 Hi stamatis, Internet access is only required if there is no local data. A user's email and password are used to encrypt their local data. Local data is separated by user emails. Calling cdb_auth will attempt to use the given credentials to decrypt a local file in the user's space. Being able to decrypt the files means the user has been authenticated. If there is no internet and there is no local data then a user cannot be authenticated. If there is internet but no local data, passing cloud authentication also grants local authentication. A user will have to create local data in this state before they can authenticate subsequent times without internet. RE: SImple Stand-Alone Applicatiopn with a Local Only DataBase - stamatis - 09-09-2020 (09-08-2020, 06:02 PM)efrain.c Wrote: Hi stamatis, Thank you again efrain.c... To be honest, this became more obvious from your other reply regarding local databases. I think many coming to this may, like myself, have the mindset of using SQL or Filemaker data stores where it's possible to have an entirely local solution or a networked solution. For me, what wasn't entirely clear was that in liveCloud you can only create a cloud database - this can be synced to a local DB, but in effect it's a cloud based and not a local solution. Once i got this clear in my head, all of the above makes absolute sense... RE: SImple Stand-Alone Applicatiopn with a Local Only DataBase - clarencemartin - 09-09-2020 Hi stamatis and Efrain, I think Stamatis does'nt understand that with LiveCloud, you use the Cloud component to build the Database that can be used locally without having to have cloud access for the project. ie, stand alone applications can be built for local data use only once it is built. All of the API's needed for the local only data applicaation are included. I hope that my understanding is correct? ie: once built you do not need the cloud. RE: SImple Stand-Alone Applicatiopn with a Local Only DataBase - efrain.c - 09-10-2020 That's correct, Clarence. The data model for an app has to be created on the cloud. You can then export the toolkit and have an app be completely offline/local. All the CRUD operations can be performed on local data by passing "local" to the APIs. |