JohnL4 / Diaspora

Diaspora RPG tools
MIT License
0 stars 0 forks source link

Write an initial login page #43

Closed JohnL4 closed 7 years ago

JohnL4 commented 7 years ago

Now that we're about to write data to some web server somewhere, we need authentication so we can keep the entire world from griefing us by filling up our database with porn. For FireBase, this requires authentication to at least try to slow that firehose down.

The preferred way to do the login is by redirect, and we can't (at present) redirect into the middle of our page flow, so we need to authenticate before we even start.

Note: Can probably use localStorage to stuff the data we need to save into the browser, and retrieve it after the redirect (should probably clear it after saving it to the d/b, to prevent confusion). Or use timestamps for both, to figure out which one is more recent (timestamp on same browser for both pieces of datga).

JohnL4 commented 7 years ago

This turned out not to be such a big deal once I thought about it some. I wrote the "session ops" tab and am successfully using localStorage (which seems pretty widely implemented) to save cluster data before navigating away from the page.

We'll still need some sort of authentication-provider-chooser page (email/password? Facebook? Twitter?) in the future, but that's really going to be a separate issue than this one.