Page MenuHomePhabricator

Logging in from fr Copypatrol redirects to en Copypatrol after login
Closed, ResolvedPublic3 Estimated Story Points

Description

Logging in on https://tools.wmflabs.org/copypatrol/fr lands you up on https://tools.wmflabs.org/copypatrol/en
This is suboptimal behavior.

Event Timeline

kaldari triaged this task as Medium priority.Nov 17 2016, 6:02 PM
kaldari set the point value for this task to 1.

Probably. This might be trickier than it looks because

  1. Either the callback will have to vary depending on language version (not possible likely since it's the same tool)
  2. We'll have to tell the app in some way which version to launch after authentication. Might need a browser cookie.

The callback, after authenticating, redirects to 'root', which will then redirect to the user's default language (based on SimpleI18n's idea of what that is). So French users will get sent back to French after authenticating, even if they're on English when they click 'log in'.

One fix is to register a new consumer, and check the "Allow consumer to specify a callback in requests and use "callback" URL above as a required prefix." option. Then we can supply "/oauth/callback?wikilang=fr" (or similar) as the callback suffix, and handle the redirection to "/fr" as required.

Alternatively, a cookie for 'current wiki language' might be easier, and would perhaps make other navigation clearer (e.g. when someone reopens CopyPatrol in a new tab).

One fix is to register a new consumer, and check the "Allow consumer to specify a callback in requests and use "callback" URL above as a required prefix." option. Then we can supply "/oauth/callback?wikilang=fr" (or similar) as the callback suffix, and handle the redirection to "/fr" as required.

It's already checked for the current consumer(s) we use. But yeah, this seems like a more complex idea than the cookie.

In any case, I vote for a change of story points for this ticket. :)

Ha, yes, good point! I'd say 3. (Why don't we ever have 4, by the way?)

And yeah, the cookie sounds best to me too.

Niharika changed the point value for this task from 1 to 3.Nov 21 2016, 3:16 AM

Changed after Sam's and mine expert assessment.

We do assessments in Fibonacci sequence (1, 2, 3, 5, 8...) for reasons beyond my understanding. I think it's got something to do with making sure most people pick the same figure, more or less.

@Niharika: Don't know if you saw my comments at the pull request.