[openstreetmap/openstreetmap-website] Welcome screen shows "Continue with authorization" when OSM account created from authorization flow (PR #4329)
Milan Cvetkovic
notifications at github.com
Tue Nov 21 13:14:08 UTC 2023
@milan-cvetkovic commented on this pull request.
> @@ -317,6 +305,24 @@ def auth_failure
private
+ def welcome_options
+ uri = URI(session[:referer]) if session[:referer].present?
+ welcome_options = {}
+ welcome_options["oauth_return_url"] = session[:referer] if uri&.path == oauth_authorization_path
+
+ begin
+ %r{map=(.*)/(.*)/(.*)}.match(uri.fragment) do |m|
+ editor = Rack::Utils.parse_query(uri.query).slice("editor")
+ welcome_options = { "zoom" => m[1],
+ "lat" => m[2],
+ "lon" => m[3] }.merge(editor).merge(welcome_options)
@tomhughes I have separated the path to setting options for OAuth return URL and coordinates, as you suggested.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4329#discussion_r1400581571
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4329/review/1741994669 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231121/b4da8f85/attachment.htm>
More information about the rails-dev
mailing list