From a4f96da2a12371229d741ea97d0eb2329b52f495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramiro=20Nu=C3=B1ez=20Dosio?= Date: Tue, 22 Nov 2022 16:14:40 +0000 Subject: [PATCH 1/7] Added link to new Flutter post. --- apps/www/_blog/2021-07-27-spot-flutter-with-postgres.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/www/_blog/2021-07-27-spot-flutter-with-postgres.mdx b/apps/www/_blog/2021-07-27-spot-flutter-with-postgres.mdx index a6349c9cec5..c459d5edfa2 100644 --- a/apps/www/_blog/2021-07-27-spot-flutter-with-postgres.mdx +++ b/apps/www/_blog/2021-07-27-spot-flutter-with-postgres.mdx @@ -86,7 +86,7 @@ With Supabase, Tyler can use Flutter to build a performant app quickly at a low experience and has even joined the SupaSquad. > Update: After being part of the SupaSquad, Tyler joined Supabase full time as part of the DevRel squad, focusing on Flutter. This is some of his latest work: [Flutter Tutorial: building a Flutter chat app -> ](https://supabase.com/blog/flutter-tutorial-building-a-chat-app). +> ](https://supabase.com/blog/flutter-tutorial-building-a-chat-app) and [Flutter Authentication and Authorization with RLS](https://supabase.com/blog/flutter-authentication-and-authorization-with-rls). You can download and install spot for [iOS](https://apps.apple.com/us/app/spot-videos/id1564675926?utm_source=supabase&utm_campaign=static) and [Android](https://play.google.com/store/apps/details?id=app.spotvideo&utm_source=supabase&utm_campaign=static) From fb01512dc50150887f0d44d2e0eb95b0aec0a21b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramiro=20Nu=C3=B1ez=20Dosio?= Date: Tue, 22 Nov 2022 16:17:34 +0000 Subject: [PATCH 2/7] Added links to new Flutter post. --- .../_blog/2022-06-30-flutter-tutorial-building-a-chat-app.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/www/_blog/2022-06-30-flutter-tutorial-building-a-chat-app.mdx b/apps/www/_blog/2022-06-30-flutter-tutorial-building-a-chat-app.mdx index e777171608f..8285a717828 100644 --- a/apps/www/_blog/2022-06-30-flutter-tutorial-building-a-chat-app.mdx +++ b/apps/www/_blog/2022-06-30-flutter-tutorial-building-a-chat-app.mdx @@ -16,6 +16,8 @@ This is the first of a series of Flutter Tutorials. During the series, you will In the first part, I will show you how to build a chat application, where users can sign up and talk to other users in a single chat room. The exchange of messages will happen in real time, meaning that you do not have to refresh the page to load new messages. +In the second part, I will show you how to implement [Authentication and Authorization (with RLS)](https://supabase.com/blog/flutter-authentication-and-authorization-with-rls) to the chat app. + In order to build this chat app, we will need a database to store all of the chat information. We will be using [Supabase](https://supabase.com/) to store the chat information. Supabase is a back end as a service that provides auth, database, storage and functions to easily create a scalable application. Supabase is a suitable backend for this app, because it provides a nice set of APIs on Postgres database that we can easily call by using the SDK. It is also perfect for chat apps like the one we are about to create, because we can subscribe to real time changes on the database. This article also assumes that you have installed Flutter already on your machine. If not, you can go to the [official Flutter page](https://docs.flutter.dev/get-started/install) to start the installation. @@ -885,6 +887,7 @@ If you have any questions please reach out via [Twitter](https://twitter.com/dsh ## More Flutter Resources +- [Part 2: Flutter Authentication and Authorization with RLS](https://supabase.com/blog/flutter-authentication-and-authorization-with-rls) - [Flutter Supabase Quick Starter Guide](https://supabase.com/docs/guides/with-flutter) - [supabase-flutter v1.0 released](https://supabase.com/blog/supabase-flutter-sdk-v1-released) - [Open source map based Flutter app with CI/CD and scalable statemanagement example](https://github.com/dshukertjr/spot) From d5ef432660670b642bf713ca5746a211769f3058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramiro=20Nu=C3=B1ez=20Dosio?= Date: Tue, 22 Nov 2022 16:19:01 +0000 Subject: [PATCH 3/7] Add link to new Flutter post. --- .../2022-08-02-supabase-flutter-sdk-1-developer-preview.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/www/_blog/2022-08-02-supabase-flutter-sdk-1-developer-preview.mdx b/apps/www/_blog/2022-08-02-supabase-flutter-sdk-1-developer-preview.mdx index 078d2e0134a..39f8595377c 100644 --- a/apps/www/_blog/2022-08-02-supabase-flutter-sdk-1-developer-preview.mdx +++ b/apps/www/_blog/2022-08-02-supabase-flutter-sdk-1-developer-preview.mdx @@ -159,4 +159,5 @@ If you have any feedbacks, please let us know in the issues of the [supabase-flu - [supabase-flutter 1.0 developer preview](https://pub.dev/packages/supabase_flutter) - [Flutter Tutorial: building a Flutter chat app](https://supabase.com/blog/flutter-tutorial-building-a-chat-app) +- [Flutter Tutorial - Part 2: Authentication and Authorization with RLS](https://supabase.com/blog/flutter-authentication-and-authorization-with-rls) - [Build a Flutter app with Very Good CLI and Supabase](https://verygood.ventures/blog/flutter-app-very-good-cli-supabase) From c45a510aac8bfba410fa1fc0a0a08ff3e638d345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramiro=20Nu=C3=B1ez=20Dosio?= Date: Tue, 22 Nov 2022 16:20:34 +0000 Subject: [PATCH 4/7] Add link to new flutter post. --- apps/www/_blog/2022-10-21-supabase-flutter-sdk-v1-released.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/www/_blog/2022-10-21-supabase-flutter-sdk-v1-released.mdx b/apps/www/_blog/2022-10-21-supabase-flutter-sdk-v1-released.mdx index 723c84f3e7a..e7fdabdc869 100644 --- a/apps/www/_blog/2022-10-21-supabase-flutter-sdk-v1-released.mdx +++ b/apps/www/_blog/2022-10-21-supabase-flutter-sdk-v1-released.mdx @@ -99,4 +99,5 @@ It required massive support from the community to bring the supabase-flutter to - [supabase-flutter documentation](https://supabase.com/docs/reference/dart/) - [v0 to v1 migration guide](https://supabase.com/docs/reference/dart/upgrade-guide) - [Flutter Tutorial: building a Flutter chat app](https://supabase.com/blog/flutter-tutorial-building-a-chat-app) +- [Flutter Tutorial - Part 2: Authentication and Authorization with RLS](https://supabase.com/blog/flutter-authentication-and-authorization-with-rls) - [Build a Flutter app with Very Good CLI and Supabase](https://verygood.ventures/blog/flutter-app-very-good-cli-supabase) From 89f1351965bde968e050101dfb780070f453a2e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramiro=20Nu=C3=B1ez=20Dosio?= Date: Tue, 22 Nov 2022 16:22:08 +0000 Subject: [PATCH 5/7] Add link to new Flutter post. --- apps/docs/pages/guides/with-flutter.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/docs/pages/guides/with-flutter.mdx b/apps/docs/pages/guides/with-flutter.mdx index dab40d95197..db3e028ad30 100644 --- a/apps/docs/pages/guides/with-flutter.mdx +++ b/apps/docs/pages/guides/with-flutter.mdx @@ -794,6 +794,8 @@ Congratulations, that is it! You have now built a fully functional user manageme ## See also - [Flutter Tutorial: building a Flutter chat app](https://supabase.com/blog/flutter-tutorial-building-a-chat-app) +- [Flutter Tutorial - Part 2: Authentication and Authorization with RLS](https://supabase.com/blog/flutter-authentication-and-authorization-with-rls) + export const Page = ({ children }) => From 1c550a4a5b92f685eb8636f528aef27320479c8f Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Tue, 22 Nov 2022 22:48:31 +0800 Subject: [PATCH 6/7] Fix auth provider forms double negative ui issue --- .../interfaces/Auth/AuthProvidersForm/ProviderForm.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx b/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx index e7707fddb08..bbdcd16f19d 100644 --- a/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx +++ b/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx @@ -32,6 +32,7 @@ const ProviderForm: FC = ({ provider }) => { const isActive = authConfig.config[`EXTERNAL_${provider?.title?.toUpperCase()}_ENABLED`] const INITIAL_VALUES = generateInitialValues() + if (provider.title === 'Email') console.log('initial', INITIAL_VALUES) const onSubmit = async (values: any, { setSubmitting, resetForm }: any) => { const payload = { ...values } @@ -46,7 +47,7 @@ const ProviderForm: FC = ({ provider }) => { const { error } = await authConfig.update(payload) if (!error) { - resetForm({ values: payload, initialValues: payload }) + resetForm({ values: { ...values }, initialValues: { ...values } }) setOpen(false) ui.setNotification({ category: 'success', message: 'Successfully updated settings' }) } else { From 0d3190b2cda1ff60d0ff68c906c25ddfacc4592a Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Tue, 22 Nov 2022 22:51:19 +0800 Subject: [PATCH 7/7] Remove console log --- .../interfaces/Auth/AuthProvidersForm/ProviderForm.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx b/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx index bbdcd16f19d..c438d96b468 100644 --- a/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx +++ b/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx @@ -32,7 +32,6 @@ const ProviderForm: FC = ({ provider }) => { const isActive = authConfig.config[`EXTERNAL_${provider?.title?.toUpperCase()}_ENABLED`] const INITIAL_VALUES = generateInitialValues() - if (provider.title === 'Email') console.log('initial', INITIAL_VALUES) const onSubmit = async (values: any, { setSubmitting, resetForm }: any) => { const payload = { ...values }