FIX gitea oauth grant url bug

This commit is contained in:
Jasder 2020-10-15 15:17:52 +08:00
parent 4ea033df23
commit 8628891582
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ module Ci::CloudAccountManageable
# redirect_uri eg:
# https://localhost:3000/login/oauth/authorize?client_id=94976481-ad0e-4ed4-9247-7eef106007a2&redirect_uri=http%3A%2F%2F121.69.81.11%3A80%2Flogin&response_type=code&state=9cab990b9cfb1805
redirect_uri = CGI.escape("#{drone_url}/login&response_type=code&state=#{state}")
redirect_uri = CGI.escape("#{drone_url}/") + "login&response_type=code&state=#{state}"
grant_url = "#{Gitea.gitea_config[:domain]}/login/oauth/authorize?client_id=#{client_id}&redirect_uri=#{redirect_uri}"
logger.info "[gitea] grant_url: #{grant_url}"