Skip to content

Conversation

@begedin
Copy link
Contributor

@begedin begedin commented Jul 3, 2015

Description

This PR enables caching of credentials required for the publish command.

Behavior

The behavior is different depending on how the command is executed.

ember-micro:publish addonName -u username -p password

Username and password are provided. A new token will be created and stored in the file system.

ember-micro:publish adddonName

Username and password are not provided. The application will attempt to load a stored token from the file system.

If a token is found, it will be used to authorize.

If a token is not found, the user will be prompted for a username and password. Once those are provided, a new token will be created and stored in the file system.

Issues

The created token is stored on the github account. In most cases, there will only ever be a few tokens created by ember-micro-addon, but in some cases, it may be considered a bit spammy.

Is this approach acceptable, or should I look into somehow making it less spammy? We can't really retrieve an existing token. We can retrieve the data for it, but the token itself is not returned, only the hash for it, and the last 8 characters.

The only way I think this is possible is to register the app and use a secret/public key system, but even then, I'm not sure if it's possible to avoid creating multiple tokens.

An alternative is to not use a token at all and store username/password credentials locally, but that sounds very unsafe.

@venkatd
Copy link

venkatd commented Jul 6, 2015

@begedin what is spammy about it? Could you explain in more detail?

EDIT
Never mind, you mean a lot of tokens will be created on the other end. I think if our command line is only creating one token and reusing it then it should be fine.

@venkatd
Copy link

venkatd commented Jul 6, 2015

👍 looks good

begedin added a commit that referenced this pull request Jul 6, 2015
@begedin begedin merged commit 4013f34 into master Jul 6, 2015
@begedin begedin deleted the cache-credentials branch July 6, 2015 07:04
@begedin begedin removed the question label Jul 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants