diff --git a/.github/workflows/sdk-preview.yml b/.github/workflows/sdk-preview.yml
index 468e0f0b97..ec34cbc51f 100644
--- a/.github/workflows/sdk-preview.yml
+++ b/.github/workflows/sdk-preview.yml
@@ -48,11 +48,11 @@ jobs:
- name: Generate Specs
run: |
- docker compose exec appwrite specs --version=latest --mode=normal --git=no
+ docker compose exec -e _APP_SDK_PREVIEW=enabled appwrite specs --version=latest --mode=normal --git=no
- name: Generate SDK
run: |
- docker compose exec appwrite sdks --platform=${{ steps.set-sdk.outputs.platform }} --sdk=${{ steps.set-sdk.outputs.sdk_type }} --version=latest --git=no
+ docker compose exec -e _APP_SDK_PREVIEW=enabled appwrite sdks --platform=${{ steps.set-sdk.outputs.platform }} --sdk=${{ steps.set-sdk.outputs.sdk_type }} --version=latest --git=no
sudo chown -R $USER:$USER ./app/sdks/${{ steps.set-sdk.outputs.platform }}-${{ steps.set-sdk.outputs.sdk_type }}
- name: Build and Publish SDK
diff --git a/AGENTS.md b/AGENTS.md
index fce82613aa..f5db88cf50 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -233,6 +233,24 @@ Register new injections alongside existing ones in `app/init/resources.php` and
Use `snake_case`; dots only for parent/child relationships (`project.id`, `storage.bucket.id`). See [Tracing with Utopia Span](#tracing-with-utopia-span) for full rules.
+## SDK generation exclusions
+
+Two independent mechanisms keep an endpoint out of a generated SDK:
+
+1. **`exclude` in `app/config/sdks.php`** -- per-SDK `services` / `methods` lists, applied at generation time.
+2. **`hide:` on `Appwrite\SDK\Method`** -- `true` drops the endpoint from every spec, an array drops it from the listed platforms only. An endpoint dropped from the spec cannot be recovered at generation time.
+
+Both are lifted when `_APP_SDK_PREVIEW=enabled`. Preview SDKs are built from a PR so a reviewer can see the whole API surface that PR produces, and they publish nothing. Only `.github/workflows/sdk-preview.yml` sets the flag, on **both** the `specs` and `sdks` steps -- setting it on `sdks` alone leaves anything hidden at layer 2 silently missing. Every other run, releases included, leaves it unset and keeps every rule.
+
+Read the flag inline at each call site with a comment, never behind a helper:
+
+```php
+// Preview SDK builds show the whole surface, so they do not hide.
+hide: System::getEnv('_APP_SDK_PREVIEW', 'disabled') !== 'enabled',
+```
+
+A new `hide:` must respect the flag. `->label('docs', false)` is a separate mechanism for routes that are not part of the public API at all (mocks, OAuth callbacks) and stays unconditional.
+
## Tracing with Utopia Span
In handlers, only call `Span::add($key, $value)`. **Never** call `Span::init`, `setError`, or `Span::finish` -- lifecycle is owned by the entry-point harness (`app/http.php`, `app/worker.php`, `app/realtime.php`, `Bus::dispatch`). For selective export, filter in the sampler in `app/init/span.php`.
diff --git a/app/config/sdks.php b/app/config/sdks.php
index 8d128cfe0c..8db20b196a 100644
--- a/app/config/sdks.php
+++ b/app/config/sdks.php
@@ -1,6 +1,8 @@
[
'key' => APP_SDK_PLATFORM_CLIENT,
'name' => 'Client',
@@ -589,3 +591,18 @@ return [
],
],
];
+
+// A preview SDK is built from a PR to show the whole API surface that PR produces
+// and publishes nothing, so none of the exclusions above apply to it. Only the
+// preview workflow sets _APP_SDK_PREVIEW; every other run, releases included,
+// leaves it unset and keeps every rule. The per-endpoint counterpart is the `hide`
+// argument on Appwrite\SDK\Method, lifted under the same flag at its call sites.
+if (System::getEnv('_APP_SDK_PREVIEW', 'disabled') === 'enabled') {
+ foreach ($platforms as $platformKey => $platform) {
+ foreach (\array_keys($platform['sdks']) as $index) {
+ unset($platforms[$platformKey]['sdks'][$index]['exclude']);
+ }
+ }
+}
+
+return $platforms;
diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php
index 35ebf065e0..844159c7e5 100644
--- a/app/controllers/api/account.php
+++ b/app/controllers/api/account.php
@@ -1320,7 +1320,8 @@ Http::get('/v1/account/sessions/oauth2/:provider')
)
],
contentType: ContentType::HTML,
- hide: [APP_SDK_PLATFORM_SERVER],
+ // Preview SDK builds show the whole surface, so they do not hide.
+ hide: System::getEnv('_APP_SDK_PREVIEW', 'disabled') === 'enabled' ? false : [APP_SDK_PLATFORM_SERVER],
))
->label('abuse-limit', 50)
->label('abuse-key', 'ip:{ip}')
diff --git a/app/controllers/api/graphql.php b/app/controllers/api/graphql.php
index 1c596bb931..5ead85582f 100644
--- a/app/controllers/api/graphql.php
+++ b/app/controllers/api/graphql.php
@@ -54,7 +54,8 @@ Http::get('/v1/graphql')
group: 'graphql',
name: 'get',
auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT],
- hide: true,
+ // Preview SDK builds show the whole surface, so they do not hide.
+ hide: System::getEnv('_APP_SDK_PREVIEW', 'disabled') !== 'enabled',
description: '/docs/references/graphql/get.md',
responses: [
new SDKResponse(
diff --git a/docs/tutorials/add-oauth2-provider.md b/docs/tutorials/add-oauth2-provider.md
index da5f514919..631612073b 100644
--- a/docs/tutorials/add-oauth2-provider.md
+++ b/docs/tutorials/add-oauth2-provider.md
@@ -8,11 +8,13 @@ OAuth2 providers help users to log in to the apps and websites without the need
As of the writing of these lines, we do not accept any minor OAuth2 providers. For us to accept some smaller and potentially unlimited number of OAuth2 providers, some product design and software architecture changes must be applied first.
+> **Tip:** Use an existing simple provider such as [Yahoo](https://github.com/search?q=repo%3Aappwrite%2Fappwrite+Yahoo&type=code) as a copy-paste reference. Search the Appwrite repository for that provider name and update every matching file for your new provider.
+
## 1. Prerequisites
It's really easy to contribute to an open source project, but when using GitHub, there are a few steps we need to follow. This section will take you step-by-step through the process of preparing your own local version of Appwrite, where you can make any changes without affecting Appwrite right away.
-> If you are experienced with GitHub or have made a pull request before, you can skip to [Implement new provider](#2-implement-new-provider).
+> If you are experienced with GitHub or have made a pull request before, you can skip to [Implement new provider](#2-implement-new-provider-backend).
### 1.1 Fork the Appwrite repository
@@ -28,13 +30,41 @@ $ git clone COPIED_URL
> To fork a repository, you will need a basic understanding of CLI and git-cli binaries installed. If you are a beginner, we recommend you to use `Github Desktop`. It is a really clean and simple visual Git client.
-Finally, you will need to create a `feat-XXX-YYY-oauth` branch based on the `master` branch and switch to it. The `XXX` should represent the issue ID and `YYY` the OAuth provider name.
+Finally, you will need to create a `feat-XXX-YYY-oauth` branch based on the `main` branch and switch to it. The `XXX` should represent the issue ID and `YYY` the OAuth provider name.
-## 2. Implement new provider
+Adding a provider usually spans **two repositories**:
-### 2.1 List your new provider
+1. **[appwrite/appwrite](https://github.com/appwrite/appwrite)** β backend adapter, config, Project OAuth2 API, response models, and tests
+2. **[appwrite/console](https://github.com/appwrite/console)** β Console UI list, update switch, and icons
-The first step in adding a new OAuth2 provider is to add it to the list of providers located at:
+The Console served by `docker compose` in this repository is a **prebuilt image** (`appwrite-console`). Local Console source changes are not picked up until you run the Console repo locally (or build and point compose at your own image).
+
+## 2. Implement new provider (backend)
+
+Throughout this guide, replace `XXX` / `Xxx` / `xxx` with your provider name in the correct casing (`Yahoo` / `yahoo`, `GitHub` / `github`, `paypalSandbox` / `PaypalSandbox`, and so on).
+
+### 2.1 Checklist
+
+| Step | File / location |
+|------|-----------------|
+| Config | `app/config/oAuthProviders.php` |
+| Adapter | `src/Appwrite/Auth/OAuth2/Xxx.php` |
+| Update action | `src/Appwrite/Platform/Modules/Project/Http/Project/OAuth2/Xxx/Update.php` |
+| Provider registry | `src/Appwrite/Platform/Modules/Project/Http/Project/OAuth2/Base.php` (`getProviderActions()`) |
+| HTTP registration | `src/Appwrite/Platform/Modules/Project/Services/Http.php` |
+| Get response models | `src/Appwrite/Platform/Modules/Project/Http/Project/OAuth2/Get.php` |
+| Response model class | `src/Appwrite/Utopia/Response/Model/OAuth2Xxx.php` |
+| Response constant | `src/Appwrite/Utopia/Response.php` (`MODEL_OAUTH2_XXX`) |
+| Provider list model | `src/Appwrite/Utopia/Response/Model/OAuth2ProviderList.php` |
+| Model registration | `app/init/models.php` |
+| Unit test allow-list | `tests/unit/Platform/Modules/Project/OAuth2/OAuth2ProviderTest.php` |
+| Changelog | `CHANGES.md` |
+
+Do **not** invent a separate test class for the provider unless it needs adapter-specific unit coverage. Add the provider id to the existing `OAuth2ProviderTest` expected list so the registry stays complete.
+
+### 2.2 List your new provider
+
+Add an entry to:
```
app/config/oAuthProviders.php
@@ -44,21 +74,34 @@ Make sure to fill in all data needed and that your provider array key name:
- is in [`camelCase`](https://en.wikipedia.org/wiki/Camel_case) format for sentence, but lowercase for names. `github` must be all lowercased, but `paypalSandbox` should have uppercase S
- has no spaces or special characters
+- matches `getName()` on your adapter class and `getProviderId()` on your Update action
-> Please make sure to keep the list of providers in `oAuthProviders.php` in the alphabetical order A-Z.
+Keep the list of providers in `oAuthProviders.php` in alphabetical order AβZ.
-### 2.2 Add Provider Logo
+Example shape:
-Add a logo image to your new provider in this path: `public/images/users`. Your logo should be a png 100Γ100px file with the name of your provider (all lowercase). Please make sure to leave about 30px padding around the logo to be consistent with other logos.
+```php
+'yahoo' => [
+ 'name' => 'Yahoo',
+ 'developers' => 'https://developer.yahoo.com/oauth2/guide/flows_authcode/',
+ 'icon' => 'icon-yahoo',
+ 'enabled' => true,
+ 'sandbox' => false,
+ 'form' => false,
+ 'beta' => false,
+ 'mock' => false,
+ 'class' => 'Appwrite\\Auth\\OAuth2\\Yahoo',
+],
+```
+
+The `icon` value is metadata for the backend. Console icons live in the Console repository (see [section 3](#3-console-and-sdk)).
### 2.3 Add Provider Class
-Once you have finished setting up all the metadata for the new provider, you need to start coding.
-
-Create a new file `XXX.php` where `XXX` is the name of the OAuth provider in [`PascalCase`](https://stackoverflow.com/a/41769355/7659504) in this location
+Create a new file `Xxx.php` where `Xxx` is the name of the OAuth provider in [`PascalCase`](https://stackoverflow.com/a/41769355/7659504) in this location:
```bash
-src/Appwrite/Auth/OAuth2/XXX.php
+src/Appwrite/Auth/OAuth2/Xxx.php
```
Inside this file, create a new class that extends the basic OAuth2 provider abstract class. Note that the class name should start with a capital letter, as PHP FIG standards suggest.
@@ -86,7 +129,7 @@ class [PROVIDER NAME] extends OAuth2
public function getName(): string
{
- return '[PROVIDER NAME]';
+ return '[providerId]'; // must match oAuthProviders.php key, e.g. 'yahoo'
}
public function getLoginURL(): string
@@ -163,6 +206,13 @@ class [PROVIDER NAME] extends OAuth2
return $this->user;
}
+
+ /**
+ * Optional. Called when enabling the provider from the Console with
+ * credentials set. Throw \Exception if client id/secret are invalid.
+ * See Github::verifyCredentials() for a token-endpoint probe pattern.
+ */
+ // public function verifyCredentials(): void {}
}
```
@@ -171,56 +221,144 @@ class [PROVIDER NAME] extends OAuth2
> If your OAuth2 provider has different endpoints for getting username/email/id, you can fire specific requests from specific get-method, and stop using `getUser` method.
-Please mention in your documentation what resources or API docs you used to implement the provider's OAuth2 protocol.
+Please mention in your pull request what resources or API docs you used to implement the provider's OAuth2 protocol.
-## 3. Test your provider
+### 2.4 Project OAuth2 Update action
-After you finish adding your new provider to Appwrite, you should be able to see it in your Appwrite console. Navigate to 'Project > Users > Providers' and check your new provider's settings form.
+Each provider exposes `PATCH /v1/project/oauth2/{providerId}` through a dedicated Update action. Copy a simple provider such as Yahoo:
-> To start the Appwrite console from the source code, you can simply run `docker compose up -d'.
-
-Add credentials and check both a successful and a failed login (where the user denies integration on the provider page).
-
-You can test your OAuth2 provider by trying to login using the [OAuth2 method](https://appwrite.io/docs/references/cloud/client-web/account#createOAuth2Session) when integrating the Appwrite Web SDK in a demo app.
-
-Pass your new adapter name as the provider parameter. If login is successful, you will be redirected to your success URL parameter. Otherwise, you will be redirected to your failure URL.
-
-If everything goes well, raise a pull request and be ready to respond to any feedback which can arise during our code review.
-
-## 4. Raise a pull request
-
-First of all, commit the changes with the message `Added XXX OAuth2 Provider` and push it. This will publish a new branch to your forked version of Appwrite. If you visit it at `github.com/YOUR_USERNAME/appwrite`, you will see a new alert saying you are ready to submit a pull request. Follow the steps GitHub provides, and at the end, you will have your pull request submitted.
-
-## π€ Stuck ?
-
-If you need any help with the contribution, feel free to head over to [our Discord channel](https://appwrite.io/discord) and we'll be happy to help you out.
-
-## π Need more freedom
-
-If your OAuth provider requires special configuration apart from `clientId` and `clientSecret` you can create a custom form. Currently this is being realized through putting all custom fields as JSON into the `clientSecret` field to keep the project API stable. You can implement your custom form following these steps:
-
-1. Add your custom form in `app/views/console/users/oauth/[PROVIDER].phtml`. Below is a template you can use. Add the filename to `app/config/oAuthProviders.php`.
-
-```php
-getParam('provider', '');
-?>
-
-
-
-
-
+```bash
+src/Appwrite/Platform/Modules/Project/Http/Project/OAuth2/Xxx/Update.php
```
-2. Add the config for creating the JSON in `public/scripts/views/forms/oauth-custom.js` using this template
+Implement at least:
-```js
-{
- "[Provider]":{
- "[JSON property name 1]":"[html element Id 1]",
- "[JSON property name 2]":"[html element Id 2]"
- }
+- `getProviderId()` β same key as in `oAuthProviders.php`
+- `getProviderClass()` β your adapter class
+- `getProviderLabel()` β human-readable name (e.g. `Yahoo`)
+- `getProviderSDKMethod()` β e.g. `updateOAuth2Yahoo`
+- `getResponseModel()` β e.g. `Response::MODEL_OAUTH2_YAHOO`
+- `getClientIdName()` / `getClientIdExample()`
+- `getClientSecretName()` / `getClientSecretExample()`
+
+Then wire the action in:
+
+1. `Base::getProviderActions()` β map `'xxx' => Xxx\Update::class`
+2. `Modules/Project/Services/Http.php` β `use` + `$this->addAction(...)`
+
+### 2.5 Response model
+
+For a standalone provider (the common case):
+
+1. Add `public const MODEL_OAUTH2_XXX = 'oAuth2Xxx';` in `src/Appwrite/Utopia/Response.php`
+2. Create `src/Appwrite/Utopia/Response/Model/OAuth2Xxx.php` extending `OAuth2Base` (see `OAuth2Yahoo.php`)
+3. Register it in `app/init/models.php` with `Response::setModel(new OAuth2Xxx());`
+4. Include `Response::MODEL_OAUTH2_XXX` in:
+ - `OAuth2ProviderList.php`
+ - `Project/Http/Project/OAuth2/Get.php`
+
+**Shared models for sandbox / alternate IDs:** Production and sandbox variants that expose the same response shape reuse one model. Do not create a second model class. Instead, list both provider ids in `$conditions['$id']`, and point both Update actions at the same `MODEL_OAUTH2_*` constant. Examples:
+
+- `paypal` / `paypalSandbox` β `OAuth2Paypal` with `'$id' => ['paypal', 'paypalSandbox']`
+- `tradeshift` / `tradeshiftBox` β `OAuth2Tradeshift` with `'$id' => ['tradeshift', 'tradeshiftBox']`
+
+You still need a separate adapter class, Update action, and `oAuthProviders.php` entry for each id; only the response model is shared. Each id must still appear in `Base::getProviderActions()` and in `OAuth2ProviderTest`.
+
+### 2.6 Tests and changelog
+
+1. Add your provider id to the `$expected` array in `OAuth2ProviderTest::testProviderRegistryIsExplicitAndComplete()`
+2. Add a line under the relevant section in `CHANGES.md`
+
+## 3. Console and SDK
+
+Backend-only changes are **not enough** for the provider to appear or save correctly in the Console.
+
+### 3.1 Console repository ([appwrite/console](https://github.com/appwrite/console))
+
+Open a companion **draft** PR that:
+
+1. Adds the provider to `src/lib/stores/oauth-providers.ts` (name, icon key, docs URL, usually `component: Main`). Auth settings **filters out** providers missing from this map.
+2. Adds a `case` in `src/routes/(console)/project-[region]-[project]/auth/updateOAuth.ts` that calls `projectSdk.updateOAuth2Xxx(...)`.
+3. Adds SVG icons under:
+ - `static/icons/light/color/{provider}.svg`
+ - `static/icons/light/grayscale/{provider}.svg`
+ - `static/icons/dark/color/{provider}.svg`
+ - `static/icons/dark/grayscale/{provider}.svg`
+
+Use an existing provider folder (for example `yahoo`) as the icon template.
+
+### 3.2 Specs and Console SDK
+
+The Console checks `OAuthProvider` from `@appwrite.io/console` before calling Update:
+
+```ts
+if (!isValueOfStringEnum(OAuthProvider, provider.key)) {
+ throw new Error(`Invalid OAuth2 provider: ${provider.key}`);
}
```
-3. In your provider class `src/Appwrite/Auth/OAuth2/[Provider].php` add logic to decode the JSON using the same property names.
+Without an SDK that includes your provider, enabling it in the UI fails with **Invalid OAuth2 provider**, even when `PATCH /v1/project/oauth2/{providerId}` works via curl.
+
+After the backend endpoints and models land, regenerate specs and SDKs from the repo root with PHP (no Docker stack required; `composer install` must already have been run):
+
+```bash
+# 1. Regenerate API specs (writes under app/config/specs/)
+php app/cli.php specs --git=no
+
+# 2. Generate the Console web SDK locally (for local Console development only)
+php app/cli.php sdks --platform=console --sdk=web --version=latest --git=no
+```
+
+Omit the flags to run the interactive prompts instead. Commit the updated specs with the Appwrite PR; official SDK publishing is handled separately by maintainers.
+
+The release sequence is:
+
+1. Land the backend endpoints and models in Appwrite, regenerate specs (`php app/cli.php specs`), and open a **draft** Appwrite PR
+2. Generate a local Console SDK (`php app/cli.php sdks`) only to exercise Console changes locally
+3. Wait for the official `@appwrite.io/console` package to be published with `OAuthProvider` and `updateOAuth2Xxx` for your provider
+4. Finish and undraft the Console PR once that published SDK is available
+
+Linking or patching a local `@appwrite.io/console` build (or temporarily bypassing the enum check) is **only for local development**. Do not treat a local SDK as merge-ready. Open your Appwrite and Console PRs as **drafts** until the official Console SDK release includes your provider, then bump the Console dependency to that release and mark the PRs ready for review.
+
+### 3.3 Local development tips
+
+- Rebuild / recreate the Appwrite containers after backend changes: `docker compose up -d --force-recreate --build`
+- Confirm the backend lists the provider, for example:
+ - `GET /v1/project/oauth2` (Network tab while on Auth settings), or
+ - `docker exec -it appwrite php -r "print_r(require '/usr/src/code/app/config/oAuthProviders.php');"`
+- To exercise Console UI changes, run the Console repository against your local Appwrite endpoint. The `appwrite-console` service in this repoβs compose file uses a published image and will not include your unreleased Console edits.
+- You can still validate the Project API without Console by calling `PATCH /v1/project/oauth2/{providerId}` directly.
+
+## 4. Test your provider
+
+1. Run unit coverage for the Project OAuth2 registry:
+
+ ```shell
+ docker compose exec appwrite test tests/unit/Platform/Modules/Project/OAuth2/
+ ```
+
+2. With backend + Console wired, open **Auth β Settings**, find your provider, save Client ID / Client Secret, and enable it.
+
+3. Exercise login with the [OAuth2 session API](https://appwrite.io/docs/references/cloud/client-web/account#createOAuth2Session) (or a small Web SDK demo). Pass your provider id as the `provider` parameter. Confirm both success and failure (user denies consent) redirects.
+
+If everything goes well, open draft pull requests for Appwrite and Console (see [section 3.2](#32-specs-and-console-sdk) for when to mark them ready) and be ready to respond to code review feedback.
+
+## 5. Raise a pull request
+
+Commit the changes with a clear message such as `Added XXX OAuth2 Provider` and push your branch. Open a **draft** PR from your fork. Link the related feature issue, and link the Console draft PR when you have one. Mark both ready for review only after the official `@appwrite.io/console` SDK includes your provider.
+
+## Stuck?
+
+If you need any help with the contribution, feel free to head over to [our Discord channel](https://appwrite.io/discord) and we'll be happy to help you out.
+
+## Providers with extra fields
+
+If your OAuth provider needs more than a single client id + client secret (domain, tenant, realm, Apple key material, OIDC discovery URLs, and so on), do **not** add legacy `.phtml` Console forms. Those paths are obsolete.
+
+Instead, follow an existing multi-field provider such as Auth0, Microsoft, Apple, or OIDC:
+
+1. Override `getParameters()` (and often the Update action constructor) in `.../OAuth2/Xxx/Update.php` so the Project API exposes the extra params.
+2. Store non-secret extras in the JSON blob under `{providerId}Secret` when that is the existing pattern for that style of provider (see Auth0 / Gitlab / Apple).
+3. Override `buildReadResponse()` when the Console needs those extras back (with secrets zeroed).
+4. In the Console, either reuse `mainOAuth.svelte` with parameters from the API, or add a dedicated component under `auth/(providers)/` when the UI is special-cased (Google and OIDC are examples).
+5. Extend the `updateOAuth.ts` switch to pass every field through to `updateOAuth2Xxx`.
diff --git a/src/Appwrite/Platform/Modules/VCS/Http/Authorize/Base.php b/src/Appwrite/Platform/Modules/VCS/Http/Authorize/Base.php
index 06b0fcea1a..e28a96434e 100644
--- a/src/Appwrite/Platform/Modules/VCS/Http/Authorize/Base.php
+++ b/src/Appwrite/Platform/Modules/VCS/Http/Authorize/Base.php
@@ -67,7 +67,8 @@ abstract class Base extends Action
],
contentType: ContentType::HTML,
type: MethodType::WEBAUTH,
- hide: true,
+ // Preview SDK builds show the whole surface, so they do not hide.
+ hide: System::getEnv('_APP_SDK_PREVIEW', 'disabled') !== 'enabled',
))
->param('success', '', fn ($redirectValidator) => $redirectValidator, 'URL to redirect back to console after a successful installation attempt.', true, ['redirectValidator'])
->param('failure', '', fn ($redirectValidator) => $redirectValidator, 'URL to redirect back to console after a failed installation attempt.', true, ['redirectValidator'])
diff --git a/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Authorize/Get.php b/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Authorize/Get.php
index 6188c14b5d..efa43f4837 100644
--- a/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Authorize/Get.php
+++ b/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Authorize/Get.php
@@ -46,7 +46,8 @@ class Get extends Action
],
contentType: ContentType::HTML,
type: MethodType::WEBAUTH,
- hide: true,
+ // Preview SDK builds show the whole surface, so they do not hide.
+ hide: System::getEnv('_APP_SDK_PREVIEW', 'disabled') !== 'enabled',
))
->param('success', '', fn ($redirectValidator) => $redirectValidator, 'URL to redirect back to console after a successful installation attempt.', true, ['redirectValidator'])
->param('failure', '', fn ($redirectValidator) => $redirectValidator, 'URL to redirect back to console after a failed installation attempt.', true, ['redirectValidator'])