Closed Bug 1047521 Opened 10 years ago Closed 10 years ago

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

Categories

(Webmaker Graveyard :: webmaker.org, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: akirose, Assigned: akirose)

References

Details

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

Attachments

(2 files)

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?
Blocks: 1047525
Blocks: 1047526
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.
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: → 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.
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)
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.
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)
Flags: needinfo?(johns)
Depends on: 1052017
Depends on: 1052018
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)
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)
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)
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)
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+
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+
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
Attachment #8474185 - Flags: review?(ricardo)
Attachment #8474185 - Flags: review?(ricardo) → review+
Boom! Everything redirects as expected
Depends on: 1056351
IT WORKS! ^_^ thanks for all your help jbuck, ricardo, adam, & cade!
Status: NEW → 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: