# Username Not Available when signing up twice, first incompletely

**URL:** https://meta.discourse.org/t/username-not-available-when-signing-up-twice-first-incompletely/90452
**Category:** Support
**Created:** [6월 22, 2018, 5:09오전 UTC](https://meta.discourse.org/t/username-not-available-when-signing-up-twice-first-incompletely/90452 "2018-06-22T05:09:37Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![balibebas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/balibebas/32/100015_2.png) [@balibebas](https://meta.discourse.org/u/balibebas)
#### Post date: [6월 22, 2018, 5:09오전 UTC](https://meta.discourse.org/t/username-not-available-when-signing-up-twice-first-incompletely/90452/1 "2018-06-22T05:09:37Z")

</div>

Found a bug in `2.1.0.beta2` (derived from page source) from which may be an edge or corner case but nevertheless it should be reproducible. It impacts the user sign-up flow for individuals who bail on SSO in favor of an email sign-up. The impact is that an available username becomes reserved by the system.

Here’s a visual of the bug, which is preventing me from signing up for [community.bitwarden.com](http://community.bitwarden.com) with my preferred username:

 ![55%20PM](https://global.discourse-cdn.com/meta/original/3X/4/8/480fafbfec23798bc40abe92030ff7aead681f8a.png)

Impacted users:

- Users who decide not to use SSO and bail on the process.

To reproduce:

1. Navigate to [community.bitwarden.com](http://community.bitwarden.com) (or preferably a test server running `2.1.0.beta2`).
2. Attempt to sign-up for an account using SSO with GitHub.
3. Do not complete registration by email.
4. Attempt to sign-up again by email.
5. Observe email not received.
6. Refresh with cache clear.
7. Attempt to sign-up again by email.
8. Observe username unavailable.

I’m not aware of model state is at this point in the back-end but I’m guessing there’s a username in a users table without an associated email address or with an incorrect email address, and possibly erroneously linked to a GitHub account. Only way I can see to get my username back is to contact the forum admins or wait and hope there’s some kind of reclaimation process to purge users who didn’t complete the sign-up in full.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [6월 22, 2018, 5:15오전 UTC](https://meta.discourse.org/t/username-not-available-when-signing-up-twice-first-incompletely/90452/2 "2018-06-22T05:15:28Z")

</div>

Isn’t that kind of an edge case? why would someone signing up from github all of a sudden change their mind and start the sign up process all over again?

I’m quite sure that there should be threshold after which the username will be available again (in case your system has created an account which isn’t activated yet) but this isn’t a case that is gonna happen on a regular basis!

and 11 Steps to reproduce?

Would like to add to this, This can potentially be by design too as just in case the Github user changes his mind and wants to sign up again then they would be upset that their username (which was available) has all of a sudden gone unavailable. There can be network issues too in case a user was authorizing and their network went down?\>

---

<div class="post-metadata">

### Author: ![balibebas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/balibebas/32/100015_2.png) [@balibebas](https://meta.discourse.org/u/balibebas)
#### Post date: [6월 22, 2018, 5:19오전 UTC](https://meta.discourse.org/t/username-not-available-when-signing-up-twice-first-incompletely/90452/3 "2018-06-22T05:19:14Z")

</div>

> [@itsbhanusharma](#):
>
> Isn’t that kind of an edge case?

As stated above, this is probably an edge case.

> [@itsbhanusharma](#):
>
> and 11 Steps to reproduce?

Log-in flows are complex by nature. It could be reduced with loss of detail.

> [@itsbhanusharma](#):
>
> I’m quite sure that there should be threshold after which the username will be available again

That’s in part why I opened this bug. It’s not clear that will actually happen.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [6월 22, 2018, 5:22오전 UTC](https://meta.discourse.org/t/username-not-available-when-signing-up-twice-first-incompletely/90452/4 "2018-06-22T05:22:02Z")

</div>

> [@balibebas](#):
>
> It’s not clear that will actually happen.

I can probably confirm what happens! … After the period you’ve stated in : `purge_unactivated_users_grace_period_days`  
the username should become available again.

> [@balibebas](#):
>
> Log-in flows are complex by nature. It could be reduced with loss of detail.

I still don’t understand how much rare it would be for someone to all of a sudden ditch social sign in and start the registration flow again.

---

<div class="post-metadata">

### Author: ![balibebas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/balibebas/32/100015_2.png) [@balibebas](https://meta.discourse.org/u/balibebas)
#### Post date: [6월 22, 2018, 5:30오전 UTC](https://meta.discourse.org/t/username-not-available-when-signing-up-twice-first-incompletely/90452/5 "2018-06-22T05:30:25Z")

</div>

> [@itsbhanusharma](#):
>
> I still don’t understand how much rare it would be for someone to all of a sudden ditch social sign in and start the registration flow again.

I’m not sure myself either. In my case I simply didn’t have access to my GitHub email address to confirm login and choose to use an email I did have access to.

> [@itsbhanusharma](#):
>
> I can probably confirm what happens!

Thanks for making me aware of this. Not sure what the default setting is or if the admins of the forum have customized it but I’ll just wait and try to sign-up again once purged.

Note on the above, I’ve reduced the number of steps to reproduce from 11 to 8.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [6월 22, 2018, 5:31오전 UTC](https://meta.discourse.org/t/username-not-available-when-signing-up-twice-first-incompletely/90452/6 "2018-06-22T05:31:45Z")

</div>

> [@balibebas](#):
>
> didn’t have access to my GitHub email address to confirm login and choose to use an email I did have access to.

If your address is verified on github then you shouldn’t be receiving a confirmation email from discourse.

And I’d stress again this all more or less looks like it is by design not by fault so I think this belongs to support not bug.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [6월 22, 2018, 5:33오전 UTC](https://meta.discourse.org/t/username-not-available-when-signing-up-twice-first-incompletely/90452/7 "2018-06-22T05:33:29Z")

</div>

> [@balibebas](#):
>
> Not sure what the default setting is

> <https://github.com/discourse/discourse/blob/main/config/site_settings.yml#L441-L442>

---

<div class="post-metadata">

### Author: ![balibebas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/balibebas/32/100015_2.png) [@balibebas](https://meta.discourse.org/u/balibebas)
#### Post date: [6월 22, 2018, 6:18오전 UTC](https://meta.discourse.org/t/username-not-available-when-signing-up-twice-first-incompletely/90452/9 "2018-06-22T06:18:44Z")

</div>

Given the purge process is in place I’d say this issue isn’t worth anymore attention. Thanks to @itsbhanusharma and @Mittineague for your help leveling up my understanding.

And to satisfy any curiosity I typically choose not to use SSO in favor of password management in most cases and have found a way to quiet GH email notifications on my account:

 ![35%20PM](https://global.discourse-cdn.com/meta/original/3X/9/b/9b99c226d8edd9487af98f32838c3c2ff2f54a03.png)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [6월 22, 2018, 7:55오전 UTC](https://meta.discourse.org/t/username-not-available-when-signing-up-twice-first-incompletely/90452/10 "2018-06-22T07:55:06Z")

</div>

> [@itsbhanusharma](#):
>
> I can probably confirm what happens! … After the period you’ve stated in : `purge_unactivated_users_grace_period_days`  
> the username should become available again.

Yes, this is as designed, and the above is true. The default for that setting is 14 days though.

Your workaround is simply to complete the login via GitHub.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [7월 22, 2018, 7:55오전 UTC](https://meta.discourse.org/t/username-not-available-when-signing-up-twice-first-incompletely/90452/11 "2018-07-22T07:55:07Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
