From 07f2580d1fd3b9d7d25677ba065f92818749660a Mon Sep 17 00:00:00 2001
From: tglide <26071571+TGlide@users.noreply.github.com>
Date: Thu, 16 Feb 2023 21:08:32 +0000
Subject: [PATCH 002/105] fix: fix auth services alert message & abstract oauth
update function
---
.../project-[project]/auth/appleOAuth.svelte | 44 +++++-----------
.../project-[project]/auth/auth0OAuth.svelte | 38 ++++----------
.../auth/authentikOAuth.svelte | 38 ++++----------
.../project-[project]/auth/gitlabOAuth.svelte | 38 ++++----------
.../project-[project]/auth/mainOAuth.svelte | 38 ++++----------
.../auth/microsoftOAuth.svelte | 38 ++++----------
.../project-[project]/auth/oktaOAuth.svelte | 48 +++++------------
.../project-[project]/auth/updateOAuth.ts | 51 +++++++++++++++++++
8 files changed, 122 insertions(+), 211 deletions(-)
create mode 100644 src/routes/console/project-[project]/auth/updateOAuth.ts
diff --git a/src/routes/console/project-[project]/auth/appleOAuth.svelte b/src/routes/console/project-[project]/auth/appleOAuth.svelte
index d741025cc..681e3a06e 100644
--- a/src/routes/console/project-[project]/auth/appleOAuth.svelte
+++ b/src/routes/console/project-[project]/auth/appleOAuth.svelte
@@ -1,14 +1,13 @@
diff --git a/src/routes/console/project-[project]/auth/microsoftOAuth.svelte b/src/routes/console/project-[project]/auth/microsoftOAuth.svelte
index 41dc6f1b2..8b0f4a376 100644
--- a/src/routes/console/project-[project]/auth/microsoftOAuth.svelte
+++ b/src/routes/console/project-[project]/auth/microsoftOAuth.svelte
@@ -1,14 +1,11 @@
@@ -25,13 +28,18 @@ let client = Client()
Before sending any API calls to your new Appwrite project, make sure your device or emulator
has network access to your Appwrite project's hostname or IP address.
-
-
- For self-hosted solutions
- When connecting to a locally hosted Appwrite project from an emulator or a mobile device,
- you should use the private IP of the device running your Appwrite project as the hostname
- of the endpoint instead of localhost. You can also use a service like ngrok to proxy the
- Appwrite server.
-
-
+ {#if !dismissedAlert}
+
+ (dismissedAlert = true)}>
+ For self-hosted solutions
+ When connecting to a locally hosted Appwrite project from an emulator or a mobile device,
+ you should use the private IP of the device running your Appwrite project as the hostname
+ of the endpoint instead of localhost. You can also use a service like ngrok to proxy
+ the Appwrite server.
+
+
+ {/if}
diff --git a/src/routes/console/project-[project]/overview/platforms/wizard/flutter/step3.svelte b/src/routes/console/project-[project]/overview/platforms/wizard/flutter/step3.svelte
index 6f46f657d..cac8f77ef 100644
--- a/src/routes/console/project-[project]/overview/platforms/wizard/flutter/step3.svelte
+++ b/src/routes/console/project-[project]/overview/platforms/wizard/flutter/step3.svelte
@@ -2,6 +2,7 @@
import { Alert, Code } from '$lib/components';
import { WizardStep } from '$lib/layout';
import { sdkForProject } from '$lib/stores/sdk';
+ import { Mode, MODE } from '$lib/system';
const { endpoint, project } = sdkForProject.client.config;
const code = `import 'package:appwrite/appwrite.dart';
@@ -11,6 +12,8 @@ client
.setEndpoint('${endpoint}')
.setProject('${project}')
.setSelfSigned(status: true); // For self signed certificates, only use for development`;
+
+ let dismissedAlert = false;
@@ -26,13 +29,18 @@ client
Before sending any API calls to your new Appwrite project, make sure your device or emulator
has network access to your Appwrite project's hostname or IP address.
-
-
- For self-hosted solutions
- When connecting to a locally hosted Appwrite project from an emulator or a mobile device,
- you should use the private IP of the device running your Appwrite project as the hostname
- of the endpoint instead of localhost. You can also use a service like ngrok to proxy the
- Appwrite server.
-
-
+ {#if !dismissedAlert}
+
+ (dismissedAlert = true)}>
+ For self-hosted solutions
+ When connecting to a locally hosted Appwrite project from an emulator or a mobile device,
+ you should use the private IP of the device running your Appwrite project as the hostname
+ of the endpoint instead of localhost. You can also use a service like ngrok to proxy
+ the Appwrite server.
+
+