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

Do not delete user on verification email error #1736

Merged
merged 1 commit into from
Oct 26, 2017
Merged

Do not delete user on verification email error #1736

merged 1 commit into from
Oct 26, 2017

Conversation

bquenin
Copy link
Contributor

@bquenin bquenin commented Oct 26, 2017

Fix #1734

How To Test

$ alias amp='amp -k'
$ amp cluster create --registration=email --notifications=true --local-no-logs --local-no-metrics
[localhost:50101]
ampagent image pull failed, which is expected on a development version
2017/10/26 10:41:14 ampctl (version: 0.16.0-dev, build: 37c5dd2f)
2017/10/26 10:41:14 Version test: PASS
2017/10/26 10:41:14 Labels test: PASS
2017/10/26 10:41:14 Using the following path for secrets: /defaults
2017/10/26 10:41:14 Skipping already existing secret: alertmanager_yml
2017/10/26 10:41:14 Skipping already existing secret: amplifier_yml
2017/10/26 10:41:14 Skipping already existing secret: certificate_amp
2017/10/26 10:41:14 Using the following path for configs: /defaults
2017/10/26 10:41:14 Skipping already existing config: prometheus_alerts_rules
2017/10/26 10:41:14 Skipping already existing network: ampnet
2017/10/26 10:41:14 Deploying stack stacks/single/01-core.yml
Creating service amp_etcd
Creating service amp_amplifier
Creating service amp_gateway
2017/10/26 10:41:26 Deploying stack stacks/single/04-proxy.yml
Creating service amp_proxy
{"Swarm Status":"active","Core Services":4,"User Services":0}
$ amp user signup --name bquenin --email bquenin@axway.com --password password
[localhost:50101]
Error: SendGrid API key is empty
$ amp user ls
[localhost:50101]
USERNAME   EMAIL   CREATED ON
bquenin            26 Oct 17 12:41
su                 26 Oct 17 12:41
$ amp user signup --name bquenin --email bquenin@axway.com --password password
[localhost:50101]
Error: user already exists
$ amp user ls
[localhost:50101]
USERNAME   EMAIL   CREATED ON
bquenin            26 Oct 17 12:41
su                 26 Oct 17 12:41
$ docker secret create sendgrid - < ~/amplifier.yml # Where amplifier.yml contains a valid SendGrid key
$ docker service update --detach=false --secret-rm amplifier_yml --secret-add src=sendgrid,target=amplifier.yml amp_amplifier
amp_amplifier
overall progress: 1 out of 1 tasks 
y2rmwmgpew8d: running   [==================================================>] 
verify: Service converged 
$ amp user resend-verification-token bquenin
[localhost:50101]
A new verification email has been sent to bquenin
$ amp -s localhost:50101 user verify eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJUeXBlIjoidmVyaWZpY2F0aW9uIiwiQWNjb3VudE5hbWUiOiJicXVlbmluIiwiQWN0aXZlT3JnYW5pemF0aW9uIjoiIiwiZXhwIjoxNTA5MDE4MTM4LCJpc3MiOiJhbXBsaWZpZXIifQ.I5R3e-axWwLNvejcvh5VVIFuVEOsf8TgdpK2mA73GzA
[localhost:50101]
Your account has now been activated.
$ amp login --name bquenin --password password
[localhost:50101]
Welcome back bquenin!
$

Copy link
Contributor

@ndegory ndegory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ndegory ndegory merged commit b0763f9 into master Oct 26, 2017
@ndegory ndegory deleted the user-signup branch October 26, 2017 16:01
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.

2 participants