-
Notifications
You must be signed in to change notification settings - Fork 90
Conversation
(Checked, nope, this doesn't happen on this PR.) |
Ok, I think this is ready for review, but we should not merge it until we've decided to officially switch from Persona to the new OAuth2 server. @ScottDowne, can you take a look but not merge it? |
I've temporarily deployed this branch to http://mozteach.toolness.org/ if anyone wants to try it out. |
Hey @adamlofting, any ideas on how to approach the switch to the new login mechanism through google analytics? As you can see in this PR, I've removed a number of One thing I'm now realizing with the flow outlined in #576 is that we're redirecting users from teach.mozilla.org to teach-api (domain TBD), which then redirects them to id.webmaker.org. The process goes in reverse when the user has finished logging in or signing up. And I'm not sure if there's an easy way to track that path through GA, which concerns me. |
There is a new test failing, r- because of that. I'm also surprised it still uses the persona UI? Is that intended? |
Er, which test is failing? Travis CI doesn't seem to think any tests fail, and when I checked before submitting the PR, nothing seemed to be failing... Where are you seeing persona? There should definitely not be any traces of persona left in the codebase in this PR, so I should remove any that I missed. |
Yeah, this isn't the first time I had weirdness with teach login locally. I think something must be up with my setup for teach api? |
Let's get this up on staging and test there. No point in debugging a local setup for a login system that's in flux. |
Oh, weird... Ok, as soon as id.webmaker.org is ready we can merge this then! |
👍 time to start testing this. id is in a good enough place now on staging. |
So many excites! Just did the migration flow and the login flow, and both worked beautifully. |
🌳 !! |
This is a different attempt at supporting OAuth2 (#576). A few distinctions from the previous attempt in #608:
LoginLink
andLogoutLink
components that make it easier to add login/logout links from anywhere on the site. The links also work via standardhref
attributes rather thanonClick
handlers, since the new OAuth2 system just works by redirecting the browser to new pages.Also, the login widget has changed so that it now looks like this when the page first loads:
Typically this message will only be shown for a second or two. If the login server is successfully contacted, the usual content appears depending on whether the user is logged in or not.
However, if an error occurs contacting the login server, the following appears:
Still need to do:
LoginLink
.LogoutLink
.TeachAPI::checkLoginStatus()
.login:error
event trigger something other than awindow.alert()
, since it can now be triggered on page load and we don't want a modal to appear at page load.