Closed Bug 1518680 Opened 7 years ago Closed 6 years ago

Login needs a bug fix and a refactor

Categories

(Taskcluster :: Services, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: owlish, Assigned: owlish)

Details

After I switched tc-login to correct Auth0 library, the service became broken. That needs fixing.

Also, while debugging, I noticed that the service could use some refactoring (I found the code, small as it is, a bit difficult to navigate).

I'm not sure a refactor is worthwhile -- this functionality will likely move to tc-web-server, and be refactored in that process. That said, a quick fix-up refactor never hurts..

I just wanted to improve readability a bit. You can look at the refactor here https://github.com/taskcluster/taskcluster/compare/master...bug1518680?expand=1 and see if you like it.

The main change is in mozilla-auth0.js file. The switch part in the tests - a sketch of the future Auth0 mock. The tests will stay the same, I only want them to be testing the whole methods (marked by // main method comment I added <-- these will be gone). I think it's pretty quick - I did that refactor yesterday. I haven't had chance to work on tests properly today, but that shouldn't be complicated.

Component: Login → Services
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.