GitHub login
Added github login, now using passportjs for authentication.
To use add [--github allowedGitHubLogin] to allow for a single account to log in as there is no support for multiuser.
What's left:
- [x] improve doc to explain how to setup a github app.
- [ ] improve go to github page (currently it is a blank page with a link to it).
- [ ] use SB_GITHUB_ALLOWED_USER instead of arg
But submitting for review as it is a bit big and might take some time and it is currently working so we could start using it right away. I'll address the above either in this pr or a separate one.
Future improvements:
- use other oauth providers and find a way to differentiate between them
- figure out a better way to see if a password user has already authenticated (via sessions)
fixes https://github.com/silverbulletmd/silverbullet/issues/16
Oh my this is cool! Will check it out once I'm back at a proper computer. If there's a way to do generic oauth flows also for the purposes of getting tokens inside plugs that would be super awesome as well. I'd be interested in getting this auth token available to the silverbullet-GitHub plug for instance.
I'd be interested in getting this auth token available to the silverbullet-GitHub plug for instance.
it would be on the client, but for the server I think it needs some sort of different workflow.
Idea: How about a
--github-authflag (with no value) and supplySB_GITHUB_ALLOWED_USERas env variable too?
I'll add it to the list of todos to fix in this PR
This is cool. A bit of a hassle to setup still, but that's probably unavoidable. Still struggling to think how to supply tokens and configuration. Now it's a bit of a random mix of env variables and a github handle.
yeah, we can probably make use of only env vars as suggested, but we need the three items so it's either a config file or env vars.
Closing this in agreement with @Willyfrog . Needs a redo now that SB is based on Deno, unfortunately.