env('OAUTH_GITLAB_HOST'), ]); } public function getSettingsForm(): array { return array_merge(parent::getSettingsForm(), [ TextInput::make('OAUTH_GITLAB_HOST') ->label('Custom Host') ->placeholder('Only set a custom host if you are self hosting gitlab') ->columnSpan(2) ->url() ->autocomplete(false) ->default(env('OAUTH_GITLAB_HOST')), ]); } public function getSetupSteps(): array { return array_merge([ Step::make('Register new Gitlab OAuth App') ->schema([ Placeholder::make('') ->content(new HtmlString(Blade::render('Check out the Gitlab docs on how to create the oauth app.'))), TextInput::make('_noenv_callback') ->label('Redirect URI') ->dehydrated() ->disabled() ->hintAction(fn () => request()->isSecure() ? CopyAction::make() : null) ->default(fn () => config('app.url') . (Str::endsWith(config('app.url'), '/') ? '' : '/') . 'auth/oauth/callback/gitlab'), ]), ], parent::getSetupSteps()); } public function getIcon(): string { return 'tabler-brand-gitlab'; } public function getHexColor(): string { return '#fca326'; } public static function register(Application $app): self { return new self($app); } }