Skip to content
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

client may "register" in the local credential store before registering remotely #31

Open
rabbah opened this issue Feb 4, 2021 · 0 comments

Comments

@rabbah
Copy link
Contributor

rabbah commented Feb 4, 2021

const register = async () => {
const { username, password } = await getUserCreds();
await setClientCreds({
accountName: 'Commander CLI',
username,
password,
client: 'cli',
});

try {
const res = await invokeCommand('register');
const text = res.data.attachments
? res.data.attachments[0].text

Note the credential store is updated first. So if the remote registration fails, the credential store is incorrect.

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

No branches or pull requests

1 participant