chinchang / web-maker

A blazing fast & offline frontend playground
https://webmaker.app
MIT License
2.57k stars 317 forks source link

Add offline auth sources #349

Open titaniumbones opened 5 years ago

titaniumbones commented 5 years ago

Meta info

Context

We are looking into using web-maker as the front end for delivering simple web-development lessons in a low-bandwidth school environment in Himalayan India (see the skeletal website and github repos for a little more information). Students in the classes in general do not have email addresses and often do not have phone numbers, so the built-in firebase auth methods will not work for them. We will in any case be running the application server from a local node in the classroom with no access to the Internet, so remote authentication will be difficult or impossible.

Request

It looks like firebase supports creation of new users via the SDK, and I guess there is a firebase admin node module. Is there any chance that you could bolt an admin interface for adding accounts onto the server? I imagine there are significant security model issues that we ourselves are probably not equipped to think through, though we will try to do something ourselves if we need to.

titaniumbones commented 5 years ago

tagging @dcwalk @faraz2023 for tracking purposes.

chinchang commented 5 years ago

@titaniumbones That is really some great work you guys are doing! Glad to hear you are looking into trying out Web Maker. To evaluate your requirement further I would need some more context on this.

Looking at your other Github issue, it seems like you are trying to run Web Maker locally. May I ask the reason behind setting it up locally? Because Web Maker once opened over the Internet can be used without Internet in future. Is it that the internet is unavailable even for opening it once on student machines?

You can also look into using the Chrome extension which can be installed without Internet as shown here -> https://blog.httpwatch.com/2017/11/15/installing-a-chrome-extension-without-an-internet-connection/ The CRX file can be found here -> https://clients2.google.com/service/update2/crx?response=redirect&prodversion=[YOUR_CHROME_VERSION]&x=id%3Dlkfkkhfhhdkiemehlpkgjeojomhpccnh%26uc

Coming back to your suggestion about creating accounts locally. Web Maker is able to save creations locally even without Internet. Do you need accounts locally without email so that you can have those creations saved at some central server also? From what I read, the firebase SDK also finally creates the account on Firebase servers on cloud. So even that would require Internet.

titaniumbones commented 5 years ago

@chinchang the last time we were at the school we had no access at all to Internet. You can read a few more details in this rambling note, but basically: the school is in West Sikkim, where all Internet travels over cell phone signal, and reception in the school area is very poor due to the mountainous terrain. We want to be able to share curricular materials over the local network as project skeletons (that's also why we're interested in #295 ), and for that we are pretty sure would need our own server. If the project is successful we would want to expand into other schools that are similarly on the edge of the Internet, so running a self-contained service is an important goal.

Coming back to your suggestion about creating accounts locally. Web Maker is able to save creations locally even without Internet. Do you need accounts locally without email so that you can have those creations saved at some central server also? From what I read, the firebase SDK also finally creates the account on Firebase servers on cloud. So even that would require Internet.

hmm. right. shoot. I wonder what the solution to that problem is. We are trying to avoid using alpha D-web technologies in this project but we might need some kind of distributed persistent data store.

Last time we were in Sikkim we used a lightly hacked version of JSBin, which stores both user accounts and project data in an SQL database. That infrastructure is very convenient for us, but unfortunately JSBin is not really maintained as a multi-contributor project and installation & deployment instructions are not quite up to date. I really like that web-maker works so easily in an offline state and is built that way from the ground up using components. If you're really interested you can read a little bit about our aims and requirements in this section of our requirements draft. @dcwalk what do you think?