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
This commit is contained in:
Râu Cao 2025-05-16 15:59:40 +04:00
parent 208b1f04ae
commit dbbf116c52
Signed by: raucao
GPG Key ID: 37036C356E56CC51
2 changed files with 6 additions and 2 deletions

View File

@ -23,7 +23,11 @@ class Services::RsAuthsController < Services::BaseController
end
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
end

View File

@ -31,7 +31,7 @@ RSpec.describe Services::RsAuthsController, type: :controller do
end
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)
end
end