Compare commits

...

2 Commits

Author SHA1 Message Date
7c43a4d919
Merge branch 'master' into live
All checks were successful
continuous-integration/drone/push Build is passing
2025-05-16 16:01:31 +04:00
dbbf116c52
Fix RS storage-first auth work in dev, remove token
All checks were successful
continuous-integration/drone/push Build is passing
See https://github.com/remotestorage/remotestorage.js/issues/900
2025-05-16 15:59:40 +04:00
2 changed files with 6 additions and 2 deletions

View File

@ -23,7 +23,11 @@ class Services::RsAuthsController < Services::BaseController
end end
def launch_app def launch_app
launch_url = "#{@auth.launch_url}#remotestorage=#{current_user.address}&access_token=#{@auth.token}" user_address = Rails.env.development? ?
"#{current_user.cn}@localhost:3000" :
current_user.address
launch_url = "#{@auth.launch_url}#remotestorage=#{user_address}"
redirect_to launch_url, allow_other_host: true redirect_to launch_url, allow_other_host: true
end end

View File

@ -31,7 +31,7 @@ RSpec.describe Services::RsAuthsController, type: :controller do
end end
it "redirects to the given URL with the correct RS URL fragment params" do it "redirects to the given URL with the correct RS URL fragment params" do
launch_url = "https://app.example.com#remotestorage=#{user.address}&access_token=#{@auth.token}" launch_url = "https://app.example.com#remotestorage=#{user.address}"
expect(response).to redirect_to(launch_url) expect(response).to redirect_to(launch_url)
end end
end end