fix(GitHub Node): Update auth urls for enterprise server (#15533)

This commit is contained in:
Michael Kret
2025-05-29 12:33:16 +03:00
committed by GitHub
parent 50388d471f
commit bc66d9fb7d
3 changed files with 110 additions and 2 deletions

View File

@@ -28,7 +28,7 @@ export class GithubOAuth2Api implements ICredentialType {
name: 'authUrl',
type: 'hidden',
default:
'={{$self["server"] === "https://api.github.com" ? "https://github.com" : $self["server"]}}/login/oauth/authorize',
'={{$self["server"] === "https://api.github.com" ? "https://github.com" : $self["server"].split("://")[0] + "://" + $self["server"].split("://")[1].split("/")[0]}}/login/oauth/authorize',
required: true,
},
{
@@ -36,7 +36,7 @@ export class GithubOAuth2Api implements ICredentialType {
name: 'accessTokenUrl',
type: 'hidden',
default:
'={{$self["server"] === "https://api.github.com" ? "https://github.com" : $self["server"]}}/login/oauth/access_token',
'={{$self["server"] === "https://api.github.com" ? "https://github.com" : $self["server"].split("://")[0] + "://" + $self["server"].split("://")[1].split("/")[0]}}/login/oauth/access_token',
required: true,
},
{