wikimedia / ToolforgeBundle

A Symfony 4 & 5 bundle that provides some common parts of web-based tools running on Wikimedia's Toolforge. Maintained by the Wikimedia Foundation's Community Tech team.
https://packagist.org/packages/wikimedia/toolforge-bundle
GNU General Public License v3.0
13 stars 4 forks source link

Allow client to specify a URL to redirect to after logging in #24

Closed MusikAnimal closed 5 years ago

samwilson commented 5 years ago

This looks good to me (although I also haven't yet tested it). The only thing I can think of is maybe adding to the docs something about the fact that any callback URL must be prefixed with the URL recorded in the consumer on Meta (and the consumer callback must have that 'prefix' option set). I'm not sure what happens when you give it a completely different URL, but I think it'll error out before redirecting back from the wiki.

MusikAnimal commented 5 years ago

This looks good to me (although I also haven't yet tested it). The only thing I can think of is maybe adding to the docs something about the fact that any callback URL must be prefixed with the URL recorded in the consumer on Meta (and the consumer callback must have that 'prefix' option set). I'm not sure what happens when you give it a completely different URL, but I think it'll error out before redirecting back from the wiki.

I've added a bit more information in the README.

This change is live at https://tools.wmflabs.org/global-search, for instance https://tools.wmflabs.org/global-search/?q=Ezell (I manually changed ToolforgeBundle's AuthController)

samwilson commented 5 years ago

Thanks for this!

I've released 0.15.0 with it.