-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Self-hosted as an alternative frontend, in "single-instance mode" #35
Comments
Looks like it's not possible to read the cookie from the main Mastodon site - it's set to HttpOnly and HostOnly, so e.g. |
I think this could be doable, but Pinafore would have to integrate with the Mastodon/Pleroma server on the backend in order to share the cookie. E.g. it could be embedded into the HTML or accessible via a REST endpoint or something. |
Another nice feature would be |
I've been thinking more about this, in context of #891. I think if instance admins wanted to host Pinafore at I envision something like:
If I believe Sapper supports paths, but I'd need to check. The logged-out homepage could also contain some boilerplate saying "You're not logged in; please log in at example.com". |
I would also ideally like the instance-switcher to be completely disabled in this case, to truly "lock" Pinafore to a given instance. Also |
How would the environment variables translate for a static site export? Outside of that concern, the instance and path configuration model seems good to me. The ordinary Pinafore login flow is fine. I think it should be preserved other than skipping the instance selection screen. I think that would avoid the A way to disable the instance-switcher would be nice. Perhaps that should be a separate setting from |
Pinafore is already a static site (with some mild routing logic). The environment variables would be inlined during build.
Hmmm, I guess I wonder what use case there is to have instance-switching disabled, but not |
You're right that it makes no sense to have instance switching disabled without locking to a specific instance. I don't currently use the instance switcher, so I'd be fine if setting Now, if someone has a primary account on a Pinafore setup with |
Yeah I think it just complicates things from a UI perspective if there's a default instance that relies on cookies (or similar mechanism), whereas you can also sign into other instances using a different mechanism. |
Looks like this may not be possible the way I envisioned it. Even if an admin hosts pinafore at
At least, this is how it seems Mastodon's |
Follow here, would be nice to use pinafore as default FE for a instance with pre-configured instance. |
Replace default UI and login with username and password would be fine for me, but default instance should be pre-filled. |
Pinafore as a frontend would also need to accept reply/boost/follow requests done on other instances. Mastodon redirects to the instance interface - the user would need to end up back in Pinafore after logging in. Also another crazy idea - let people from other instances respond/boost/follow by logging in to the Pinafore frontend using their instance but staying there. I think I need to wrap my head around this. |
I've been using Pinafore a lot recently with gotosocial (https://github.com/superseriousbusiness/gotosocial) which doesn't have its own frontend. It would be really really cool to be able to deploy an instance of Pinafore and have it just automatically point towards whatever GoToSocial instance is configured in Pinafore's environment variables. Is this still something you're working on by any chance? |
I'm not actively working on it, no. If somebody wants to implement it as described above (e.g. using environment variables during the build process), then I'd be happy to accept a PR. 🙂 |
Over at https://github.com/nickspacek/pinafore/tree/specific-instance I hacked in a couple of environment variables that adjust the display and behavior of login to support single instance mode. I wonder about having a config file to customize the UI for this use case, to add some flexibility around help text, logo, etc. Thoughts? |
@nickspacek For a long time I thought it would be reasonable to set some env vars during build to accomplish this. See #35 (comment) As long as it's not a huge, invasive PR or has a perf impact for the normal use case, I'd accept a PR to support this. Note you may have to deal with my Sapper fork though: https://github.com/nolanlawson/sapper |
@nickspacek Handling the incoming links from other instances would seem to also require URLs that use account names (e.g. |
This would be useful for admins who just want Pinafore as an alternative UI that only works for their instance. It's possible, but would probably need a separate build system in order to lock it to a single instance and automatically log folks in.
The text was updated successfully, but these errors were encountered: