Support login through Mastodon API. #239
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit add Mastdon as an option for login by using mastodon-passport.
Mastodon being a federated social network, there are several instances of the service, so you need to know against which server you do the authentication. In this commit, a domain parameter in the configuration file indicate this.
If users from different instances should be able to log in, this commit must be improved to ask the domain on the login page.
This commit also reorganises a bit the auth.js file by regrouping the code related to a login method inside the same if block. This has the effect of not exposing unneeded API endpoints is those are disabled in the configuration.
This pull request is mainly for reference, as I've seen that you haven't merged similar pull requests.