From 12fab7788dc92412e8f6572dd379db8eed5d5a8d Mon Sep 17 00:00:00 2001 From: Joel Lee Date: Thu, 29 Aug 2024 09:59:17 +0800 Subject: [PATCH 01/11] fix: add new auth error codes (#28954) * fix: add error codes * fix: update copy * fix: run prettier on suggested changes --- .../components/MDX/auth_error_codes_table.mdx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/apps/docs/components/MDX/auth_error_codes_table.mdx b/apps/docs/components/MDX/auth_error_codes_table.mdx index cb6a3c591b9..3bfd5a19831 100644 --- a/apps/docs/components/MDX/auth_error_codes_table.mdx +++ b/apps/docs/components/MDX/auth_error_codes_table.mdx @@ -10,23 +10,28 @@ To supplement HTTP status codes, Supabase Auth returns a string error code which | Code | Description | | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `anonymous_provider_disabled` | Anonymous sign-ins are disabled. | | `bad_code_verifier` | Returned from the PKCE flow where the provided code verifier does not match the expected one. Indicates a bug in the implementation of the client library. | | `bad_json` | Usually used when the HTTP body of the request is not valid JSON. | | `bad_jwt` | JWT sent in the `Authorization` header is not valid. | | `bad_oauth_callback` | OAuth callback from provider to Auth does not have all the required attributes (state). Indicates an issue with the OAuth provider or client library implementation. | | `bad_oauth_state` | OAuth state (data echoed back by the OAuth provider to Supabase Auth) is not in the correct format. Indicates an issue with the OAuth provider integration. | | `captcha_failed` | Captcha challenge could not be verified with the captcha provider. Check your captcha integration. | -| `conflict` | General database conflict, such as concurrent requests on resources that should not be modified concurrently. Can often occur when you have too many session refresh requests firing off at the same time for a user. Check your app for concurrency issues, and if detected back off exponentially. | +| `conflict` | General database conflict, such as concurrent requests on resources that should not be modified concurrently. Can often occur when you have too many session refresh requests firing off at the same time for a user. Check your app for concurrency issues, and if detected, back off exponentially. | | `email_conflict_identity_not_deletable` | Unlinking this identity causes the user's account to change to an email address which is already used by another user account. Indicates an issue where the user has two different accounts using different primary email addresses. You may need to migrate user data to one of their accounts in this case. | | `email_exists` | Email address already exists in the system. | | `email_not_confirmed` | Signing in is not allowed for this user as the email address is not confirmed. | | `email_provider_disabled` | Signups are disabled for email and password. | | `flow_state_expired` | PKCE flow state to which the API request relates has expired. Ask the user to sign in again. | | `flow_state_not_found` | PKCE flow state to which the API request relates no longer exists. Flow states expire after a while and are progressively cleaned up, which can cause this error. Retried requests can cause this error, as the previous request likely destroyed the flow state. Ask the user to sign in again. | +| `hook_payload_over_size_limit` | Payload from Auth exceeds maximum size limit. | +| `hook_timeout` | Unable to reach hook within maximum time allocated. | +| `hook_timeout_after_retry` | Unable to reach hook after maximum number of retries. | | `identity_already_exists` | The identity to which the API relates is already linked to a user. | | `identity_not_found` | Identity to which the API call relates does not exist, such as when an identity is unlinked or deleted. | | `insufficient_aal` | To call this API, the user must have a higher [Authenticator Assurance Level](https://supabase.com/docs/guides/auth/auth-mfa). To resolve, ask the user to solve an MFA challenge. | | `invite_not_found` | Invite is expired or already used. | +| `invalid_credentials` | Login credentials or grant type not recognized. | | `manual_linking_disabled` | Calling the `supabase.auth.linkUser()` and related APIs is not enabled on the Auth server. | | `mfa_challenge_expired` | Responding to an MFA challenge should happen within a fixed time period. Request a new challenge when encountering this error. | | `mfa_factor_name_conflict` | MFA factors for a single user should not have the same friendly name. | @@ -34,6 +39,11 @@ To supplement HTTP status codes, Supabase Auth returns a string error code which | `mfa_ip_address_mismatch` | The enrollment process for MFA factors must begin and end with the same IP address. | | `mfa_verification_failed` | MFA challenge could not be verified -- wrong TOTP code. | | `mfa_verification_rejected` | Further MFA verification is rejected. Only returned if the [MFA verification attempt hook](https://supabase.com/docs/guides/auth/auth-hooks?language=add-admin-role#hook-mfa-verification-attempt) returns a reject decision. | +| `mfa_verified_factor_exists` | Verified phone factor already exists for a user. Unenroll existing verified phone factor to continue. | +| `mfa_totp_enroll_disabled` | Enrollment of MFA TOTP factors is disabled. | +| `mfa_totp_verify_disabled` | Login via TOTP factors and verification of new TOTP factors is disabled. | +| `mfa_phone_enroll_disabled` | Enrollment of MFA Phone factors is disabled. | +| `mfa_phone_verify_disabled` | Login via Phone factors and verification of new Phone factors is disabled. | | `no_authorization` | This HTTP request requires an `Authorization` header, which is not provided. | | `not_admin` | User accessing the API is not admin, i.e. the JWT does not contain a `role` claim that identifies them as an admin of the Auth server. | | `oauth_provider_not_supported` | Using an OAuth provider which is disabled on the Auth server. | @@ -49,9 +59,10 @@ To supplement HTTP status codes, Supabase Auth returns a string error code which | `provider_email_needs_verification` | Not all OAuth providers verify their user's email address. Supabase Auth requires emails to be verified, so this error is sent out when a verification email is sent after completing the OAuth flow. | | `reauthentication_needed` | A user needs to reauthenticate to change their password. Ask the user to reauthenticate by calling the `supabase.auth.reauthenticate()` API. | | `reauthentication_not_valid` | Verifying a reauthentication failed, the code is incorrect. Ask the user to enter a new code. | +| `request_timeout` | Processing the request took too long. Retry the request. | | `same_password` | A user that is updating their password must use a different password than the one currently used. | -| `saml_assertion_no_email` | SAML assertion (user information) was received after sign in, but no email address was found in it which is required. Check the provider's attribute mapping and/or configuration. | -| `saml_assertion_no_user_id` | SAML assertion (user information) was received after sign in, but a user ID (called NameID) was not found in it which is required. Check the SAML identity provider's configuration. | +| `saml_assertion_no_email` | SAML assertion (user information) was received after sign in, but no email address was found in it, which is required. Check the provider's attribute mapping and/or configuration. | +| `saml_assertion_no_user_id` | SAML assertion (user information) was received after sign in, but a user ID (called NameID) was not found in it, which is required. Check the SAML identity provider's configuration. | | `saml_entity_id_mismatch` | (Admin API.) Updating the SAML metadata for a SAML identity provider is not possible, as the entity ID in the update does not match the entity ID in the database. This is equivalent to creating a new identity provider, and you should do that instead. | | `saml_idp_already_exists` | (Admin API.) Adding a SAML identity provider that is already added. | | `saml_idp_not_found` | SAML identity provider not found. Most often returned after IdP-initiated sign-in with an unregistered SAML identity provider in Supabase Auth. | @@ -60,7 +71,7 @@ To supplement HTTP status codes, Supabase Auth returns a string error code which | `saml_relay_state_expired` | SAML relay state is an object that tracks the progress of a `supabase.auth.signInWithSSO()` request. The SAML identity provider should respond after a fixed amount of time, after which this error is shown. Ask the user to sign in again. | | `saml_relay_state_not_found` | SAML relay states are progressively cleaned up after they expire, which can cause this error. Ask the user to sign in again. | | `session_not_found` | Session to which the API request relates no longer exists. This can occur if the user has signed out, or the session entry in the database was deleted in some other way. | -| `signup_disabled` | Sign ups (new account creation) is disabled on the server. | +| `signup_disabled` | Sign ups (new account creation) are disabled on the server. | | `single_identity_not_deletable` | Every user must have at least one identity attached to it, so deleting (unlinking) an identity is not allowed if it's the only one for the user. | | `sms_send_failed` | Sending an SMS message failed. Check your SMS provider configuration. | | `sso_domain_already_exists` | (Admin API.) Only one SSO domain can be registered per SSO identity provider. | From d09a25f742397244ec2d15005c97ced3c17b031f Mon Sep 17 00:00:00 2001 From: Francesco Sansalvadore Date: Thu, 29 Aug 2024 11:45:54 +0200 Subject: [PATCH 02/11] guard events (#28817) * guard accepted * return noop * refactor root events * cleanup * remove debug logs * npm i * revert change --- apps/www/lib/telemetry.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/www/lib/telemetry.ts b/apps/www/lib/telemetry.ts index a880edb6f5b..31f2eb90343 100644 --- a/apps/www/lib/telemetry.ts +++ b/apps/www/lib/telemetry.ts @@ -1,6 +1,7 @@ import { post } from '~/lib/fetchWrapper' import { API_URL, IS_PROD, IS_PREVIEW } from 'lib/constants' import { NextRouter } from 'next/router' +import { LOCAL_STORAGE_KEYS } from 'common' export interface TelemetryEvent { category: string @@ -14,11 +15,21 @@ export interface TelemetryProps { language: string } +const noop = () => {} + // This event is the same as in studio/lib/telemetry.tx // but uses different ENV variables for www const sendEvent = (event: TelemetryEvent, gaProps: TelemetryProps, router: NextRouter) => { - if (!IS_PROD && !IS_PREVIEW) return + const consent = + typeof window !== 'undefined' + ? localStorage.getItem(LOCAL_STORAGE_KEYS.TELEMETRY_CONSENT) + : null + const hasAcceptedConsent = consent === 'true' + const IS_DEV = !IS_PROD && !IS_PREVIEW + const blockEvent = IS_DEV || !hasAcceptedConsent + + if (blockEvent) return noop const { category, action, label, value } = event From 6ad750ac51aa4a3dfb38fffe0029bbfd4671e219 Mon Sep 17 00:00:00 2001 From: Alaister Young Date: Thu, 29 Aug 2024 19:40:16 +0800 Subject: [PATCH 03/11] chore: credit card enhancements (#28971) --- .../PaymentMethods/CreditCard.tsx | 101 +++++++++ .../PaymentMethods/CurrentPaymentMethod.tsx | 80 +++++++ .../PaymentMethods/PaymentMethods.tsx | 92 ++------ .../InvoicesSettings/InvoicesSettings.tsx | 213 +++++++++--------- 4 files changed, 306 insertions(+), 180 deletions(-) create mode 100644 apps/studio/components/interfaces/Organization/BillingSettings/PaymentMethods/CreditCard.tsx create mode 100644 apps/studio/components/interfaces/Organization/BillingSettings/PaymentMethods/CurrentPaymentMethod.tsx diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/PaymentMethods/CreditCard.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/PaymentMethods/CreditCard.tsx new file mode 100644 index 00000000000..80242306171 --- /dev/null +++ b/apps/studio/components/interfaces/Organization/BillingSettings/PaymentMethods/CreditCard.tsx @@ -0,0 +1,101 @@ +import { MoreHorizontal } from 'lucide-react' + +import { OrganizationPaymentMethod } from 'data/organizations/organization-payment-methods-query' +import { BASE_PATH } from 'lib/constants' +import { + Badge, + Button, + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from 'ui' + +interface CreditCardProps { + paymentMethod: OrganizationPaymentMethod + canUpdatePaymentMethods?: boolean + paymentMethodType?: string + setSelectedMethodForUse?: (paymentMethod: OrganizationPaymentMethod) => void + setSelectedMethodToDelete?: (paymentMethod: OrganizationPaymentMethod) => void +} + +const CreditCard = ({ + paymentMethod, + canUpdatePaymentMethods = true, + paymentMethodType, + setSelectedMethodForUse, + setSelectedMethodToDelete, +}: CreditCardProps) => { + const isActive = paymentMethod.is_default + + const expiryYear = paymentMethod.card?.exp_year ?? 0 + const expiryMonth = paymentMethod.card?.exp_month ?? 0 + + const currentMonth = new Date().getMonth() + 1 + const currentYear = new Date().getFullYear() + + const isExpiringSoon = expiryYear === currentYear && expiryMonth === currentMonth + const isExpired = + expiryYear < currentYear || (expiryYear === currentYear && expiryMonth < currentMonth) + + if (!paymentMethod.card) return null + + return ( +
+
+ Credit card brand +

**** **** **** {paymentMethod.card!.last4}

+

+ Expires: {paymentMethod.card.exp_month}/{paymentMethod.card.exp_year} +

+
+ +
+ {isExpiringSoon && Expiring soon} + {isExpired && Expired} + {isActive && Active} + + {canUpdatePaymentMethods && !isActive && ( + + +
+
+ ) +} + +export default CreditCard diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/PaymentMethods/CurrentPaymentMethod.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/PaymentMethods/CurrentPaymentMethod.tsx new file mode 100644 index 00000000000..fcec633c87b --- /dev/null +++ b/apps/studio/components/interfaces/Organization/BillingSettings/PaymentMethods/CurrentPaymentMethod.tsx @@ -0,0 +1,80 @@ +import { CreditCardIcon } from 'lucide-react' +import Link from 'next/link' + +import { PermissionAction, SupportCategories } from '@supabase/shared-types/out/constants' +import { useParams } from 'common' +import ShimmeringLoader from 'components/ui/ShimmeringLoader' +import { useOrganizationPaymentMethodsQuery } from 'data/organizations/organization-payment-methods-query' +import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query' +import { useCheckPermissions } from 'hooks/misc/useCheckPermissions' +import { Button } from 'ui' +import CreditCard from './CreditCard' + +const CurrentPaymentMethod = () => { + const { slug } = useParams() + + const { + data: subscription, + isLoading: isLoadingSubscription, + isError: isErrorSubscription, + } = useOrgSubscriptionQuery({ + orgSlug: slug, + }) + const { + data: paymentMethods, + isLoading: isLoadingOrganizationPaymentMethods, + isError: isErrorOrganizationPaymentMethods, + } = useOrganizationPaymentMethodsQuery({ slug }) + + const isLoading = isLoadingSubscription || isLoadingOrganizationPaymentMethods + const isError = isErrorSubscription || isErrorOrganizationPaymentMethods + + const defaultPaymentMethod = paymentMethods?.data.find((pm) => pm.is_default) + + const canReadPaymentMethods = useCheckPermissions( + PermissionAction.BILLING_READ, + 'stripe.payment_methods' + ) + + // since this component is an enhancement, + // if it can't read payment methods, we will just not show it + if (!canReadPaymentMethods || isError) return null + + return ( +
+ {isLoading ? ( + + ) : subscription?.payment_method_type === 'invoice' ? ( +

+ You get a monthly invoice and payment link via email. To change your payment method, + please contact us via our support form. +

+ ) : !defaultPaymentMethod ? ( +
+ +

No payment methods

+
+ ) : ( + + )} + + +
+ ) +} + +export default CurrentPaymentMethod diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/PaymentMethods/PaymentMethods.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/PaymentMethods/PaymentMethods.tsx index fe5d2fedc6a..432ba80700d 100644 --- a/apps/studio/components/interfaces/Organization/BillingSettings/PaymentMethods/PaymentMethods.tsx +++ b/apps/studio/components/interfaces/Organization/BillingSettings/PaymentMethods/PaymentMethods.tsx @@ -1,5 +1,4 @@ import { PermissionAction } from '@supabase/shared-types/out/constants' -import { useQueryClient } from '@tanstack/react-query' import { useParams } from 'common' import Link from 'next/link' import { useState } from 'react' @@ -17,33 +16,20 @@ import { FormSection, FormSectionContent } from 'components/ui/Forms/FormSection import NoPermission from 'components/ui/NoPermission' import PartnerManagedResource from 'components/ui/PartnerManagedResource' import ShimmeringLoader from 'components/ui/ShimmeringLoader' -import { organizationKeys } from 'data/organizations/keys' import { useOrganizationPaymentMethodsQuery } from 'data/organizations/organization-payment-methods-query' import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query' import { useCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization' -import { BASE_PATH } from 'lib/constants' import { getURL } from 'lib/helpers' -import { - Alert, - Badge, - Button, - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuSeparator, - DropdownMenuTrigger, - IconCreditCard, - IconMoreHorizontal, - IconPlus, -} from 'ui' +import { Alert, Button, IconCreditCard, IconPlus } from 'ui' import ChangePaymentMethodModal from './ChangePaymentMethodModal' +import CreditCard from './CreditCard' import DeletePaymentMethodModal from './DeletePaymentMethodModal' +import { CreditCardIcon } from 'lucide-react' const PaymentMethods = () => { const { slug } = useParams() const selectedOrganization = useSelectedOrganization() - const queryClient = useQueryClient() const [selectedMethodForUse, setSelectedMethodForUse] = useState() const [selectedMethodToDelete, setSelectedMethodToDelete] = useState() const [showAddPaymentMethodModal, setShowAddPaymentMethodModal] = useState(false) @@ -151,70 +137,22 @@ const PaymentMethods = () => { {(paymentMethods?.data?.length ?? 0) === 0 ? ( -
- +
+

No payment methods

) : (
- {paymentMethods?.data?.map((paymentMethod) => { - const isActive = paymentMethod.is_default - - if (!paymentMethod.card) return null - - return ( -
-
- Credit card brand -

- **** **** **** {paymentMethod.card!.last4} -

-

- Expires: {paymentMethod.card.exp_month}/ - {paymentMethod.card.exp_year} -

-
- {isActive && Active} - {canUpdatePaymentMethods && !isActive ? ( - - - - - - {subscription?.payment_method_type === 'card' && ( - <> - setSelectedMethodForUse(paymentMethod)} - > -

Use this card

-
- - - )} - setSelectedMethodToDelete(paymentMethod)} - > -

Delete card

-
-
-
- ) : null} -
- ) - })} + {paymentMethods?.data?.map((paymentMethod) => ( + + ))}
)} diff --git a/apps/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.tsx b/apps/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.tsx index c9f057bce11..f41ee2ba537 100644 --- a/apps/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.tsx +++ b/apps/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.tsx @@ -10,6 +10,7 @@ import { ScaffoldContainerLegacy } from 'components/layouts/Scaffold' import Table from 'components/to-be-cleaned/Table' import AlertError from 'components/ui/AlertError' import NoPermission from 'components/ui/NoPermission' +import PartnerManagedResource from 'components/ui/PartnerManagedResource' import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader' import { getInvoice } from 'data/invoices/invoice-query' import { useInvoicesCountQuery } from 'data/invoices/invoices-count-query' @@ -18,7 +19,7 @@ import { useCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization' import { formatCurrency } from 'lib/helpers' import { Button, IconChevronLeft, IconChevronRight, IconDownload, IconFileText } from 'ui' -import PartnerManagedResource from 'components/ui/PartnerManagedResource' +import CurrentPaymentMethod from '../BillingSettings/PaymentMethods/CurrentPaymentMethod' const PAGE_LIMIT = 10 @@ -94,111 +95,117 @@ const InvoicesSettings = () => { {isError && } {isSuccess && ( - , - Date, - Amount, - Invoice number, - - Status - , - , - ]} - body={ - invoices.length === 0 ? ( - - -

- {isLoading ? 'Checking for invoices' : 'No invoices for this organization yet'} -

-
-
- ) : ( - <> - {invoices.map((x) => { - return ( - - - - - -

{dayjs(x.period_end * 1000).format('MMM DD, YYYY')}

-
- -

{formatCurrency(x.subtotal / 100)}

-
- -

{x.number}

-
- - - - -
- {x.subtotal > 0 && - [ - InvoiceStatus.UNCOLLECTIBLE, - InvoiceStatus.OPEN, - InvoiceStatus.ISSUED, - ].includes(x.status as InvoiceStatus) && ( - - )} + <> + -
-
-
- ) - })} - - -
-

- {isErrorCount - ? 'Failed to retrieve total number of invoices' - : `Showing ${offset + 1} to ${ - offset + invoices.length - } out of ${count} invoices`} -

-
-
-
+
, + Date, + Amount, + Invoice number, + + Status + , + , + ]} + body={ + invoices.length === 0 ? ( + + +

+ {isLoading + ? 'Checking for invoices' + : 'No invoices for this organization yet'} +

- - ) - } - /> + ) : ( + <> + {invoices.map((x) => { + return ( + + + + + +

{dayjs(x.period_end * 1000).format('MMM DD, YYYY')}

+
+ +

{formatCurrency(x.subtotal / 100)}

+
+ +

{x.number}

+
+ + + + +
+ {x.subtotal > 0 && + [ + InvoiceStatus.UNCOLLECTIBLE, + InvoiceStatus.OPEN, + InvoiceStatus.ISSUED, + ].includes(x.status as InvoiceStatus) && ( + + )} + +
+
+
+ ) + })} + + +
+

+ {isErrorCount + ? 'Failed to retrieve total number of invoices' + : `Showing ${offset + 1} to ${ + offset + invoices.length + } out of ${count} invoices`} +

+
+
+
+
+
+ + ) + } + /> + )} ) From d1dfa7cebe6ad54c29047f578f0f0cf4a1005b76 Mon Sep 17 00:00:00 2001 From: jingsam Date: Thu, 29 Aug 2024 19:52:19 +0800 Subject: [PATCH 04/11] bugfix: make the default theme works (#28940) --- packages/common/Providers.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/common/Providers.tsx b/packages/common/Providers.tsx index 4fc2ff9bfa0..76a6c775eee 100644 --- a/packages/common/Providers.tsx +++ b/packages/common/Providers.tsx @@ -7,7 +7,7 @@ export function ThemeProvider({ children, ...props }: ThemeProviderProps) { // @ts-ignore next-themes is old :/ return ( - + {children} ) From 8579f6de0dd97e62cc142657e05439ebf5dfd9f1 Mon Sep 17 00:00:00 2001 From: Jonathan Summers-Muir Date: Thu, 29 Aug 2024 19:55:58 +0800 Subject: [PATCH 05/11] Update DatabaseConnectionString.tsx (#28887) --- .../Database/DatabaseSettings/DatabaseConnectionString.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/studio/components/interfaces/Settings/Database/DatabaseSettings/DatabaseConnectionString.tsx b/apps/studio/components/interfaces/Settings/Database/DatabaseSettings/DatabaseConnectionString.tsx index 27a4648500a..4d126082987 100644 --- a/apps/studio/components/interfaces/Settings/Database/DatabaseSettings/DatabaseConnectionString.tsx +++ b/apps/studio/components/interfaces/Settings/Database/DatabaseSettings/DatabaseConnectionString.tsx @@ -48,7 +48,7 @@ const CONNECTION_TYPES = [ { id: 'golang', label: 'Golang' }, { id: 'jdbc', label: 'JDBC' }, { id: 'dotnet', label: '.NET' }, - { id: 'nodejs', label: 'Nodejs' }, + { id: 'nodejs', label: 'Node.js' }, { id: 'php', label: 'PHP' }, { id: 'python', label: 'Python' }, ] From 39f72b89bd95db46b99db88d9426fdf9e397f626 Mon Sep 17 00:00:00 2001 From: Alaister Young Date: Thu, 29 Aug 2024 20:17:14 +0800 Subject: [PATCH 06/11] fix: auth0 migration guide typo (#28910) --- apps/docs/app/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/docs/app/page.tsx b/apps/docs/app/page.tsx index a272040b75e..35d0045cc69 100644 --- a/apps/docs/app/page.tsx +++ b/apps/docs/app/page.tsx @@ -72,7 +72,7 @@ const products = [ const migrationGuides = [ { - title: 'Auth', + title: 'Auth0', icon: '/docs/img/icons/auth0-icon', href: '/guides/resources/migrating-to-supabase/auth0', }, From cc09d7f0329437822c451874e1fb82e481cc266c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Mikol=C3=A1=C5=A1?= <87542951+Demizon3433@users.noreply.github.com> Date: Thu, 29 Aug 2024 14:24:02 +0200 Subject: [PATCH 07/11] Add missing "work" to the end of the title (#28919) From 004502dceea534911ce0c9ccbc461ebee1665bf3 Mon Sep 17 00:00:00 2001 From: Brice Suazo <74240706+bricesuazo@users.noreply.github.com> Date: Thu, 29 Aug 2024 20:33:05 +0800 Subject: [PATCH 08/11] docs(realtime): remove duplicate tab for dart (#28969) docs: remove repeated tab for dart --- apps/docs/content/guides/realtime/presence.mdx | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/apps/docs/content/guides/realtime/presence.mdx b/apps/docs/content/guides/realtime/presence.mdx index 3fc1ba375e1..e7710fc4614 100644 --- a/apps/docs/content/guides/realtime/presence.mdx +++ b/apps/docs/content/guides/realtime/presence.mdx @@ -82,22 +82,6 @@ SUPABASE_KEY = '' supabase = create_client(SUPABASE_URL, SUPABASE_KEY) ``` - - - -```dart -void main() { - Supabase.initialize( - url: 'https://.supabase.co', - anonKey: '', - ); - - runApp(MyApp()); -} - -final supabase = Supabase.instance.client; -``` - From 8724b01326570f7b2fab2843ab643850c39376e2 Mon Sep 17 00:00:00 2001 From: Francesco Sansalvadore Date: Thu, 29 Aug 2024 14:37:32 +0200 Subject: [PATCH 09/11] add mfa to security page (#21455) Co-authored-by: Ivan Vasilov --- apps/www/pages/security.mdx | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/apps/www/pages/security.mdx b/apps/www/pages/security.mdx index 9ef9bc52cfd..3612809fbb0 100644 --- a/apps/www/pages/security.mdx +++ b/apps/www/pages/security.mdx @@ -1,15 +1,13 @@ import { KeyIcon, - LinkIcon, UserGroupIcon, ShieldCheckIcon, RewindIcon, CreditCardIcon, ClipboardCheckIcon, } from '@heroicons/react/outline' -import { Button, IconGitHub, IconActivity } from 'ui' +import { IconActivity, IconLock, IconSmartphone } from 'ui' import Layout from '../layouts/Layout' -import Link from 'next/link' export const meta = { type: 'lp', @@ -22,7 +20,7 @@ export const Section = ({ children, icon, img }) => (
{icon && (
-
{icon}
+
{icon}
)} {img &&
{img}
} @@ -30,14 +28,14 @@ export const Section = ({ children, icon, img }) => (
) -
+
-

Security at Supabase

-

+

Security at Supabase

+

Supabase is trusted by thousands of developers for building and deploying secure applications.

-
+
![Supabase security](/images/security/security-hero.png) @@ -48,6 +46,16 @@ export const Section = ({ children, icon, img }) => (
+
}> + +### Multi-factor Authentication + +Multi-factor authentication (MFA) adds an additional layer of security to your user account, by requiring a second factor to verify your user identity. + +Supabase allows users to enable MFA on their account and set it as a requirement for subsequent logins. + +
+
}> ### SOC 2 @@ -61,6 +69,7 @@ Enterprise and Team customers can access our SOC2 report [on the dashboard](/das
+
}> ### HIPAA From 2cdaa311da65e2f0a026342676fcbe0eac4ab1ba Mon Sep 17 00:00:00 2001 From: Alireza Zamani Date: Thu, 29 Aug 2024 16:12:18 +0330 Subject: [PATCH 10/11] docs: add missed "to" (#28890) --- .../custom-claims-and-role-based-access-control-rbac.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/docs/content/guides/database/postgres/custom-claims-and-role-based-access-control-rbac.mdx b/apps/docs/content/guides/database/postgres/custom-claims-and-role-based-access-control-rbac.mdx index d429ad3baea..350e89ef290 100644 --- a/apps/docs/content/guides/database/postgres/custom-claims-and-role-based-access-control-rbac.mdx +++ b/apps/docs/content/guides/database/postgres/custom-claims-and-role-based-access-control-rbac.mdx @@ -71,7 +71,7 @@ values ## Create Auth Hook to apply user role -The [Custom Access Token Auth Hook](/docs/guides/auth/auth-hooks#hook-custom-access-token) runs before a token is issued. You can use it edit the JWT. +The [Custom Access Token Auth Hook](/docs/guides/auth/auth-hooks#hook-custom-access-token) runs before a token is issued. You can use it to edit the JWT. Date: Thu, 29 Aug 2024 21:59:00 +0900 Subject: [PATCH 11/11] Fix: Correct default value for inbucket.port in configuration documentation (#28953) * Correct default value from 'true' to actual port number. * add space --- apps/docs/spec/cli_v1_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/docs/spec/cli_v1_config.yaml b/apps/docs/spec/cli_v1_config.yaml index dc00f66b64d..6c3efb8b287 100644 --- a/apps/docs/spec/cli_v1_config.yaml +++ b/apps/docs/spec/cli_v1_config.yaml @@ -261,7 +261,7 @@ parameters: title: 'inbucket.port' tags: ['local'] required: false - default: 'true' + default: '54324' description: | Port to use for the email testing server web interface.