Kuma: U - As a wiki editor I want to log into MDN using a Google account

Created on 5 Feb 2020  路  7Comments  路  Source: mdn/kuma

User story

As a wiki editor I want to log into MDN using a Google account

Acceptance criteria

  • [ ] When a user clicks on sign in on the wiki, she is able to select Google auth in addition to Github auth
  • [ ] After signing in, the user is redirected back to the page she started on.

Tasks

If relevant, you can make a checklist for tasks.


    • [ ] This is an incomplete task.


    • [ ] Add redirect to sign-in link on Wiki to developer.mozilla.org

Membership Accts Epic user story User Story

Most helpful comment

I can't think of any other piece of code I'd like/could fix to make this issue any more resolved.
There might still be a bug lurking in that the ?next=... value is lost if you get stuck in the profile creation workflow but that'd be unrelated and best dealt with in its own issue.

The compromise we picked was that your eyes have to see the non-wiki header&footer briefly as you go through the sign-in/sign-up flow. But the end result is that you start on the Wiki, want tos sign in with Google, and end back up on the Wiki signed in with Google.

All 7 comments

Being able to do ?next= redirect links that contain the domain might be really tricky. Tricky, because it might entail digging deep into either django-allauth or even django itself.

Would it be an option to simply forfeit it.

Suppose that you're on https://wiki.developer.mozilla.org/en-US/docs/Foo/Bar and click "Sign in" it MIGHT take you to https://developer.mozilla.org/en-US/docs/Foo/Bar (same path different domain) so you're completely lost at least. The "Edit in wiki" button will still be there.

@atopal @tobinmori I started looking at this and unfortunately it's not as easy as I had hoped. The github sign in link appears in other places other than the upper right hand corner of the Wiki pages.

I think we can figure it all out but I just wanted to let you know that I think it's harder than I had first imagined.

This first PR isn't complete solution. At least it takes you from the Wiki to the ability to sign in with Google. I think, if we land this, this issue will be massively reduced in severity.

Actually we can do this without leaving the wiki domain. See https://github.com/mdn/kuma/pull/6435#pullrequestreview-356373423

So @peterbe, are you good with going with Ryan's proposed solution?

So @peterbe, are you good with going with Ryan's proposed solution?

Yes. We had a meeting about it and it has been implemented rather pleasantly in the PR.
It was a bit hairy because there's so many more places other than the upper right-hand corner linkt. Pluse everything needs to be implemented condtionally since MULTI_AUTH_ENABLED is off by default so the places in the templates where it matters need both solutions.

I can't think of any other piece of code I'd like/could fix to make this issue any more resolved.
There might still be a bug lurking in that the ?next=... value is lost if you get stuck in the profile creation workflow but that'd be unrelated and best dealt with in its own issue.

The compromise we picked was that your eyes have to see the non-wiki header&footer briefly as you go through the sign-in/sign-up flow. But the end result is that you start on the Wiki, want tos sign in with Google, and end back up on the Wiki signed in with Google.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

atopal picture atopal  路  10Comments

krishnadevz picture krishnadevz  路  12Comments

peterbe picture peterbe  路  7Comments

peterbe picture peterbe  路  6Comments

wbamberg picture wbamberg  路  9Comments