remoteStorage OAuth #109

Merged
raucao merged 24 commits from feature/rs-oauth into master 2023-08-04 08:55:29 +00:00
Showing only changes of commit 5f921f1b53 - Show all commits

View File

@@ -1,5 +1,5 @@
class Rs::OauthController < ApplicationController
before_action :require_user_signed_in
before_action :require_signed_in_with_username
def new
username, org = params[:useraddress].split("@")
@@ -97,6 +97,13 @@ class Rs::OauthController < ApplicationController
private
def require_signed_in_with_username
unless user_signed_in?
username, org = params[:useraddress].split("@")
redirect_to new_user_session_path(cn: username, ou: org)
end
end
def app_auth_url(auth)
url = "#{auth.url}#remotestorage=#{current_user.address}"
url += "&access_token=#{auth.token}"