Closed Bug 971848 Opened 10 years ago Closed 10 years ago

Implement new Webmaker auth for makeapi.webmaker.org

Categories

(Webmaker Graveyard :: MakeAPI, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jon, Assigned: cade)

References

Details

(Whiteboard: login2-phase3)

Attachments

(2 files)

Once all the new Webmaker auth components are ready, we'll need to implement them in makeapi.webmaker.org.
Whiteboard: login2
Whiteboard: login2 → login2-followup
Whiteboard: login2-followup → followup-login2
Whiteboard: followup-login2 → login2-followup
Assignee: nobody → cade
Status: NEW → ASSIGNED
Whiteboard: login2-followup → login2-phase3
This is a fairly large patch - though more deletions than additions.

In order to get the new auth routes working, I had to remove the old login-api, which caused a lot of cascading changes to how we handle loading the .env file.

I seized this opportunity to use hyperquest for making HTTP requests to the login server (It will perform better under stress than the http module).
Attachment #8381666 - Flags: review?(scott)
This is a supporting patch for the makeapi changes - because hyperquest refuses to send a request body with any request that's not POST, I've added a POST handler to `/usernames`
Attachment #8381671 - Flags: review?(scott)
Attachment #8381666 - Flags: review?(kate)
Attachment #8381671 - Flags: review?(kate)
Don't we need to make this: https://github.com/mozilla/MakeAPI/blob/master/env.sample#L2

The same as webmaker.org?
indeed.
Attachment #8381671 - Flags: review?(scott) → review+
Comment on attachment 8381666 [details] [review]
https://github.com/mozilla/MakeAPI/pull/198

Some nits, but nothing critical. It works pretty well.
Attachment #8381666 - Flags: review?(scott) → review-
Attachment #8381671 - Flags: review?(kate)
Comment on attachment 8381666 [details] [review]
https://github.com/mozilla/MakeAPI/pull/198

Fix infinite loop for non-admins, and you should be good.
Attachment #8381666 - Flags: review?(kate) → review-
Comment on attachment 8381666 [details] [review]
https://github.com/mozilla/MakeAPI/pull/198

Also, I was not able to delete a make. Received this error message:

{"status":"failure","reason":{"message":"Validation failed","name":"ValidationError","errors":{"ownerApp":{"message":"Validator \"required\" failed for path ownerApp","name":"ValidatorError","path":"ownerApp","type":"required"}}}}
Actually the problem was that the make no longer existed/had a bad path.
Attachment #8381666 - Flags: review?(kate)
Attachment #8381666 - Flags: review-
Comment on attachment 8381666 [details] [review]
https://github.com/mozilla/MakeAPI/pull/198

Ok this looks good now, I left 3 comments in the PR you should fix up though
Attachment #8381666 - Flags: review?(kate) → review+
Commit pushed to master at https://github.com/mozilla/MakeAPI

https://github.com/mozilla/MakeAPI/commit/543a86015acfca107487e8067239866ec4f7e940
Bug 971848 - Implement new webmaker-auth and remove dependency on node-webmaker-login API in favour of hyperquest
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: