Closed Bug 589979 Opened 14 years ago Closed 14 years ago

Generate username from email address

Categories

(Firefox :: Sync, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: philikon, Assigned: philikon)

References

Details

(Whiteboard: [strings])

Attachments

(3 files, 2 obsolete files)

Instead of having to enter both username and email address on sign-up, users should only be required to provide the email address. Sync could auto-generate the username e.g. by hashing the email address. To support existing users, the email address field in the setup wizard will also have to accept existing usernames (based on whether the value contains an @ character). There's one follow-up for the server: We'll have to support changing the email address which means changing the username.
If we use SHA1 and express it in base32, the end up with 32 char long usernames, incidentally the max allowed length.
Blocks: 589980
(In reply to comment #0) > There's one follow-up for the server: We'll have to support changing the email > address which means changing the username. Filed bug 592933.
Depends on: 592933
Whiteboard: [strings]
Blocks: 594437
Implement Utils.encodeBases32 and Utils.sha1Base32 as per RFC 4648.
Attachment #473569 - Flags: review?(mconnor)
The Weave.Service.account property now holds whatever the user entered for email address/username. If it only contains characters valid for usernames, it is assumed to be a username. Otherwise it's SHA1 hashed and base32 encoded. The special tab mangling (to avoid broken Basic Auth headers) is now obsolete.
Attachment #473572 - Flags: review?(mconnor)
Attached patch Part 3 (v1): UI changes (obsolete) (deleted) — Splinter Review
Consolidate email and username in the UI.
Attachment #473574 - Flags: review?(mconnor)
Assignee: nobody → philipp
Removing bug 592933 as a hard dependency.
No longer depends on: 592933
Blocks: 595066
Backwards compatibility fix: Fall back to Service.username if Service.account isn't set.
Attachment #473572 - Attachment is obsolete: true
Attachment #473936 - Flags: review?(mconnor)
Attachment #473572 - Flags: review?(mconnor)
Blocks: 594506
Attached patch Part 3 (v2): UI changes (deleted) — Splinter Review
Also update error messages mentioning user name (now mention email address where appropriate).
Attachment #473574 - Attachment is obsolete: true
Attachment #474209 - Flags: review?(mconnor)
Attachment #473574 - Flags: review?(mconnor)
Comment on attachment 473569 [details] [diff] [review] Part 1 (v1): Utils.encodeBases32 and Utils.sha1Base32 >- sha1: function sha1(message) { >+ bytesAsHex: function digest(bytes) { function bytesAsHex(bytes) >+ do_check_eq(Utils.encodeBase32("Bacon is a vegetable."), the perfect test.
Attachment #473569 - Flags: review?(mconnor) → review+
Comment on attachment 473936 [details] [diff] [review] Part 2 (v2): Account name mangling logic in Weave.Service >diff --git a/services/sync/modules/service.js b/services/sync/modules/service.js >- checkUsername: function WeaveSvc_checkUsername(username) { >+ // For backwards compatibility with the Firefox UI. please be specific about what versions of the UI have this dependency, so that when we drop support for < 4.0 final, we can excise this.
Attachment #473936 - Flags: review?(mconnor) → review+
Attachment #474209 - Flags: review?(mconnor) → review+
Blocks: 595879
Blocks: 596231
Blocks: 596620
Blocks: 596641
Blocks: 597025
verified with recent nightly minefield builds
Status: RESOLVED → VERIFIED
Blocks: 603502
Component: Firefox Sync: UI → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: