sandstormports / community-project

Tracking our collaborative progress as a team
3 stars 1 forks source link

Jake: Package 2FAuth #19

Open ocdtrekkie opened 2 years ago

ocdtrekkie commented 2 years ago

Another app I've been interested in for Sandstorm is 2FAuth, which allows you to use TOTP tokens in the browser. A while back I asked if they had a way to bypass the login for it, and I was informed this past week you can now authenticate by HTTP header, which should be very compatible with Sandstorm.

https://github.com/Bubka/2FAuth

ocdtrekkie commented 2 years ago

So what has held me up here is that Laravel really likes to use a subdirectory of the application for storage, and all of the suggestions on how to change it are annoying, involving writing basically a plugin to overwrite a function that defines the storage path.

Then there are some setup steps which seem like they will be particularly annoying to do with Sandstorm, as they both touch the storage (currently in the app directory) and the database (which is of course in /var). Ideally I'd love to not run them on grain start, because they're slow and likely irrelevant to Sandstorm's model, but obviously if they've got to touch the database, then we'd have to pre-generate the database to avoid running them on grain start.

I'm wondering if we have any present apps that use some flavor of Laravel I can look at as an example, but I can't think of any off hand.

zenhack commented 2 years ago

Have you tried symlinking that directory to somewhere under /var?

ocdtrekkie commented 2 years ago

That would probably be a workable solution, but I also can't symlink from /opt/app in my preferred dev environment, so if I get stuck on "must do that", it'll be a while until I make it to my other machine for this. The alternative I could consider for this actually, would be to not store the application in /opt/app at all, so it doesn't touch my local system, have the packaging script git clone the original repo to another directory, etc.

So I wouldn't say I'm actually "stuck" at this point, but I haven't sat down again to move past this particular roadblock.