Set up a way for people to create webmaker accounts from welcome.wmo

RESOLVED FIXED

Status

Webmaker
webmaker.org
--
major
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: akirose, Assigned: akirose)

Tracking

Details

(Whiteboard: [teachcta] [landingpages] [aug8] [webmakersnippet])

Attachments

(2 attachments)

(Assignee)

Description

4 years ago
Bring it on, persona.

Maybe we can do this with a thin proxy on wmo that welcome hits before triggering the login function? Or can we do it straight from welcome.wmo because it shares the same domain?
(Assignee)

Updated

4 years ago
Blocks: 1047525
(Assignee)

Updated

4 years ago
Blocks: 1047526
(Assignee)

Updated

4 years ago
Blocks: 1048315
@Cade

If we use https://github.com/mozilla/webmaker-auth-client 

Does this always need it's own local version of webmaker-auth running, or is there a way these static landing pages would be able to talk to the existing instance running for webmaker.org?

These landing pages are currently from a static generator, so the easiest solution would be entirely client-side.
Flags: needinfo?(cade)
Also just making note here while I remember. 

If we implement webmaker-auth-client on these pages, we should remove webmaker-rid.js from them as it has duplicate functionality.
(Assignee)

Comment 3

4 years ago
Honestly in a perfect world, the "Sign Up" and "Log In" button/links on welcome.wmo would just go to sign up/login GET routes on wmo (triggering persona modals for now, rendering signup/login forms/options later?), but idk how realistic that is.

It looks like the webmaker-auth-client requires the node side (csrf token?), so I'm not totally certain where to go with this next. Some kind of thin proxy on wmo I think.
Just adding a see also: Bug 1018237 << this was a similar request before the landing page work started. It can probably be closed as a duplicate if we solve this one.
See Also: → bug 1018237
Auth is going to require a proxy living somewhere (likely webmaker.org).

The problems I foresee with these static pages are getting CSRF tokens for the authenticate/create user APIs and enabling CORS on the static domains for the proxy routes already living on Webmaker.org.
Flags: needinfo?(cade)
Adding a requirement to this piece of work (it might be there by default):

The login process on these pages should allow us to specify a 'next URL' for the user. 

So that after someone creates an account we can route them into an appropriate first action, whether that's a starter make or something else entirely.
(Assignee)

Comment 7

4 years ago
This is definitely going to require a new EC2 instance. It will run an express server (which hopefully we can keep as bare-bones as possible) and ideally have incredibly high availability, as it will be accepting snippet traffic. Additionally, we'll need to transition the static site over from S3. Cade, are you the person to help me set that up in AWS?
Flags: needinfo?(cade)
Whiteboard: [teachcta] [landingpages] [aug8] → [teachcta] [landingpages] [aug8] [webmakersnippet]
I'm not familiar enough with AWS to set this up, we'll need JP.

Wouldn't moving this off of a static page defeat the purpose of having it there in the first place? 

We could implement a route for the static domain that will serve it a CSRF token to use in subsequent requests to the webmaker.org login proxy routes. We'd also have to add some CORS headers to those routes to allow welcome.wm.org.
Flags: needinfo?(cade)

Comment 9

4 years ago
Instead of setting up a new static server, why not take advantage of CloudFront's multiple origin support and setup the login server as this additional origin? I'm not sure what the local dev story would be, but it should work well for staging and production.
(Assignee)

Comment 10

4 years ago
Jbuck you have my attention. I'd LOVE to keep this all on a static site, but webmaker auth is gonna be very important and seemingly complicates everything.

I'm not familiar with multiple origins on CF, but if you (or JP) could help me understand how staging/prod would work, maybe I could fiddle with the express server used for local dev?
Flags: needinfo?(jon)
(Assignee)

Updated

4 years ago
Flags: needinfo?(johns)

Updated

4 years ago
Depends on: 1052017

Updated

4 years ago
Depends on: 1052018

Updated

4 years ago
Depends on: 1052019
Aki and I had a chat today and decided upon the following strategy:

1) Build webmaker-auth server for the webmaker-landing-pages staging and production
2) Integrate the webmaker-auth module into the webmaker-landing-pages server for local dev
3) Configure webmaker-landing-pages CDN to support webmaker login

Bugs are filed. Lets get to it!
Flags: needinfo?(jon)
Flags: needinfo?(johns)
(Assignee)

Comment 12

4 years ago
I know I have 2 & you have 3... is 1 this bug? And if so can I reassign it to someone more qualified?
Flags: needinfo?(jon)
(Assignee)

Comment 13

4 years ago
Just kidding, I'm an idiot.

I should note, from Comment #11

1. is Bug #1052019
2. is Bug #1052017
3. is Bug #1052018
Flags: needinfo?(jon)
(Assignee)

Comment 15

4 years ago
Comment on attachment 8473222 [details] [review]
https://github.com/mozilla/webmaker-landing-pages/pull/54

Ricardo: This PR can be tested by going to <http://localhost:9006/signup/mentors> and/or <http://localhost:9006/signup/learners>. Simply being able to log in and create an account should be considered "right" for this PR. You should still wind up at the same page after you're done.
Attachment #8473222 - Flags: review?(ricardo)
(Assignee)

Comment 16

4 years ago
Comment on attachment 8473222 [details] [review]
https://github.com/mozilla/webmaker-landing-pages/pull/54

Adam: I just have one question for you on this PR (though you're welcome to review/comment on the whole thing, I just recognize it's huge) on github.

jbuck: This one is huge too. Ricardo is doing the full review, just looking for a quick skim of login.js in relation to the PR you R+ed yesterday, and a general gut-check from you if that's okay.
Attachment #8473222 - Flags: review?(jon)
Attachment #8473222 - Flags: feedback?(adam)
Comment on attachment 8473222 [details] [review]
https://github.com/mozilla/webmaker-landing-pages/pull/54

I didn't know the answer to that question, so I've tagged jbuck in the PR comment.

I also asked a quick Q about window.location.origin.
Attachment #8473222 - Flags: feedback?(adam)
Aki, I'm not able to successfully run `grunt dev` on your branch. This is the screenshot of the output (https://www.dropbox.com/s/uoi7jb250snq42s/Screenshot%202014-08-18%2011.41.03.png). I also noticed the build is failing, could that be also part of the problem?
Comment on attachment 8473222 [details] [review]
https://github.com/mozilla/webmaker-landing-pages/pull/54

I added some comments to the PR, but it's looking pretty solid!
Attachment #8473222 - Flags: review?(jon) → review+
Attachment #8473222 - Flags: review?(ricardo) → review+
(Assignee)

Comment 21

4 years ago
Comment on attachment 8473222 [details] [review]
https://github.com/mozilla/webmaker-landing-pages/pull/54

I'm so sorry, Ricardo. That was an oversight on my part of a couple of things...

this is everything i forgot to do

- update the README (fixed)
- warn you that you'd need to copy the env.dist file to .env
- give the heads-up to run npm install again
- direct you towards https://github.com/mozilla/login.webmaker.org to clone and run the login server before testing my branch
Attachment #8473222 - Flags: review+ → review?(ricardo)
Attachment #8473222 - Flags: review?(ricardo) → review+

Comment 22

4 years ago
Commits pushed to master at https://github.com/mozilla/webmaker-landing-pages

https://github.com/mozilla/webmaker-landing-pages/commit/58cf6f998c3e415d69782c30f813543385750f59
Bug 1047521 - Set up a way for people to create webmaker accounts from welcome.wmo

https://github.com/mozilla/webmaker-landing-pages/commit/5d37adef6ce8272839226e8e99c45036189cc9cf
Merge pull request #54 from gesa/1047521/create-account-front-end

Bug 1047521 - Set up a way for people to create webmaker accounts from welcome.wmo
(Assignee)

Updated

4 years ago
Attachment #8474185 - Flags: review?(ricardo)
Attachment #8474185 - Flags: review?(ricardo) → review+
Boom! Everything redirects as expected
(Assignee)

Updated

4 years ago
Depends on: 1056351
(Assignee)

Comment 25

4 years ago
IT WORKS! ^_^ thanks for all your help jbuck, ricardo, adam, & cade!
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.