add console redirect

This commit is contained in:
Alex Turchyn committed 2023-08-08 23:28:25 +03:00
1 parent 7697b94f73
commit 896b149b25
4 files changed
+20

No files matched your search

@@ -0,0 +1,11 @@
# frozen_string_literal: true
class ConsoleRedirectController < ApplicationController
def index
auth = JsonWebToken.encode(uuid: current_user.uuid,
action: :sign_in,
exp: 1.minute.from_now.to_i)
redirect_to("#{Docuseal::CONSOLE_URL}?#{{ auth: }.to_query}", allow_other_host: true)
end
end