mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-22 06:23:28 +00:00
feat(gitlab): add custom public endpoint for OAuth redirect
Match the GitHub App endpoint picker so self-hosted / tunnel setups can
select FQDN, IP, app URL, or a custom base. Redirect URI is derived as
{base}/webhooks/source/gitlab/redirect and persisted for token exchange.
This commit is contained in:
@@ -73,4 +73,17 @@ describe('GitLab source setup view', function () {
|
||||
->assertSet('clientId', 'gitlab-app-id')
|
||||
->assertSet('clientSecretInput', 'super-secret-value');
|
||||
});
|
||||
|
||||
test('supports github-style custom public endpoint for oauth redirect uri', function () {
|
||||
Livewire::withQueryParams(['gitlab_app_uuid' => $this->gitlabApp->uuid])
|
||||
->test(Change::class)
|
||||
->assertSee('Use custom webhook endpoint')
|
||||
->assertSee('Selected endpoint')
|
||||
->set('use_custom_webhook_endpoint', true)
|
||||
->set('custom_webhook_endpoint', 'http://100.75.155.70:8000')
|
||||
->assertSet('redirectUri', 'http://100.75.155.70:8000/webhooks/source/gitlab/redirect');
|
||||
|
||||
expect($this->gitlabApp->refresh()->redirect_uri)
|
||||
->toBe('http://100.75.155.70:8000/webhooks/source/gitlab/redirect');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user