[NEW] Blockstack as decentralized auth provider#12047
Merged
sampaiodiego merged 83 commits intodevelopfrom Sep 20, 2018
Merged
Conversation
WIP: Have added stub classes and login elements without functionality BREAKING CHANGE: No other login or auth provider will function on this branch from now on.
Redirects and request generation are triggered, but response not yet handled.
Now successfully processing auth request and getting user data back to server, just need to wire up user login methods.
Can log users in, but not out. Not much catching or logging.
# Conflicts: # README.md # package-lock.json # package.json
Allows deploying to production, will write manifest attributes on request from settings and environment.
Member
|
I'm a bit worried about |
sampaiodiego
requested changes
Sep 18, 2018
| // Create and get created user to make a couple more mods before returning | ||
| logger.info(`Creating user for Blockstack ID ${ id }`); | ||
| userId = Accounts.insertUserDoc({}, newUser); | ||
| user = Meteor.users.findOne(userId); |
Member
There was a problem hiding this comment.
looks like this find's result is not being used
| const name = RocketChat.settings.get('Site_Name'); | ||
| const startUrl = Meteor.absoluteUrl(); | ||
| const description = RocketChat.settings.get('Blockstack_Auth_Description'); | ||
| const iconUrl = Meteor.absoluteUrl('assets/favicon_192'); |
Member
There was a problem hiding this comment.
we should have a proper way to get assets' addresses.. we do differently on push notifications
| import './settings.js'; | ||
| import './loginHandler.js'; | ||
|
|
||
| Meteor.isDevelopment = (process.env.ROOT_URL.indexOf('localhost') !== -1); |
Member
There was a problem hiding this comment.
this is not being used by this PR
Member
There was a problem hiding this comment.
actually, this is set by default.. is there a reason to override the default value/logic?
Member
Author
There was a problem hiding this comment.
There isn't, was a trash from the original PR
sampaiodiego
approved these changes
Sep 20, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Electron / Desktop
This implementation doesn't work with our electron/desktop yet
Admin / Service Settings
A number of admin settings are added for the package behaviour and auth request details.
EnableGenerate username- If true will generate the username automatically from the user's profile when no username came from blockstack, otherwise user will see the username selection screenAuth description- Description provided in auth request screen within BlockstackButton label text- Text of the login button on login screenAvatars
Avatars are loaded directly from Blockstack.org when user logins for the first time and saved as a local avatar, users can update the avatars from the profile page where we added the blockstack as one of the avatar source of suggestions.
The no email thing
Because Blockstack accounts do not contain an email address, yet Rocket.Chat fundamentally requires one, I've found a workaround by populating the email field with their ID @
blockstack.email.Added dependencies
Rocket.Chat required
meteor-node-stubspackage to support thecryptomodule in client.Replaces #10462
Closes #10462