Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/studio-master-alert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Alert on master breakage

on:
workflow_run:
workflows:
- 'Selfhosted Studio E2E Tests'
- 'Studio Unit Tests & Build Check'
branches: [master]
types:
- completed

permissions:
contents: read
actions: read

jobs:
notify:
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
runs-on: ubuntu-latest
steps:
- name: Send Slack alert
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DASHBOARD_WEBHOOK_URL }}
WORKFLOW_NAME: ${{ github.event.workflow_run.name }}
WORKFLOW_URL: ${{ github.event.workflow_run.html_url }}
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
COMMIT_MESSAGE: ${{ github.event.workflow_run.head_commit.message }}
COMMIT_AUTHOR: ${{ github.event.workflow_run.head_commit.author.name }}
REPO_URL: https://github.com/${{ github.repository }}
run: |
SHORT_SHA="${COMMIT_SHA:0:7}"
FIRST_LINE=$(echo "$COMMIT_MESSAGE" | head -1)

PAYLOAD=$(jq -n \
--arg workflow_name "$WORKFLOW_NAME" \
--arg workflow_url "$WORKFLOW_URL" \
--arg commit_sha "$COMMIT_SHA" \
--arg short_sha "$SHORT_SHA" \
--arg commit_msg "$FIRST_LINE" \
--arg author "$COMMIT_AUTHOR" \
--arg repo_url "$REPO_URL" \
'{
text: ":rotating_light: \($workflow_name) failed on master",
blocks: [
{
type: "header",
text: {
type: "plain_text",
text: ":rotating_light: master is broken"
}
},
{
type: "section",
text: {
type: "mrkdwn",
text: "*Workflow:* <\($workflow_url)|\($workflow_name)>\n*Commit:* <\($repo_url)/commit/\($commit_sha)|\($short_sha)> \($commit_msg)\n*Author:* \($author)"
}
}
]
}')

curl -f -X POST "$SLACK_WEBHOOK_URL" \
-H 'Content-Type: application/json' \
-d "$PAYLOAD"
22 changes: 22 additions & 0 deletions apps/design-system/turbo.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "./../../node_modules/turbo/schema.json",
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["^build"],
"env": [
"NEXT_PUBLIC_BASE_PATH",
"NEXT_PUBLIC_APP_URL",
// These envs are used in the packages
"NEXT_PUBLIC_STORAGE_KEY",
"NEXT_PUBLIC_AUTH_DEBUG_KEY",
"NEXT_PUBLIC_AUTH_PERSISTED_KEY",
"NEXT_PUBLIC_AUTH_NAVIGATOR_LOCK_KEY",
"NEXT_PUBLIC_AUTH_DETECT_SESSION_IN_URL",
"NEXT_PUBLIC_GOTRUE_URL",
"NEXT_PUBLIC_SUPABASE_ANON_KEY",
],
"outputs": [".next/**", "!.next/cache/**", "!.next/dev/**/*", ".contentlayer/**"],
},
},
}
2 changes: 0 additions & 2 deletions apps/docs/app/contributing/content.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,10 @@ Some guides and tutorials will require that users copy their Supabase project UR
```mdx
<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />
```

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />

### Step Hike

Expand Down
9 changes: 5 additions & 4 deletions apps/docs/content/_partials/api_settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ Now that you've created some database tables, you are ready to insert data using

To do this, you need to get the Project URL and key from [the project **Connect** dialog](/dashboard/project/\_?showConnect=true&connectTab={{ .tab }}&framework={{ .framework }}).

[Read the API keys docs](/docs/guides/api/api-keys) for a full explanation of all key types and their uses.

<Admonition type="note" title="Changes to API keys">

Supabase is changing the way keys work to improve project security and developer experience. You can [read the full announcement](https://github.com/orgs/supabase/discussions/29260), but in the transition period, you can use both the current `anon` and `service_role` keys and the new publishable key with the form `sb_publishable_xxx` which will replace the older keys.

**The legacy keys will be deprecated shortly, so we strongly encourage switching to and using the new publishable and secret API keys**.

In most cases, you can get the correct key from [the Project's **Connect** dialog](/dashboard/project/\_?showConnect=true&connectTab={{ .tab }}&framework={{ .framework }}), but if you want a specific key, you can find all keys in [the API Keys section of a Project's Settings page](/dashboard/project/_/settings/api-keys/):

- **For legacy keys**, copy the `anon` key for client-side operations and the `service_role` key for server-side operations from the **Legacy API Keys** tab.
- **For new keys**, open the **API Keys** tab, if you don't have a publishable key already, click **Create new API Keys**, and copy the value from the **Publishable key** section.
**For new keys**, open the **API Keys** tab, if you don't have a publishable key already, click **Create new API Keys**, and copy the value from the **Publishable key** section.

</Admonition>

[Read the API keys docs](/docs/guides/api/api-keys) for a full explanation of all key types and their uses.
2 changes: 1 addition & 1 deletion apps/docs/content/guides/auth/quickstarts/nextjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ hideToc: true

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />


</StepHikeCompact.Details>

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/guides/auth/quickstarts/react-native.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ hideToc: true

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />


</StepHikeCompact.Details>
<StepHikeCompact.Code>
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/guides/auth/quickstarts/react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ hideToc: true

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />



</StepHikeCompact.Details>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ Create a `.env.local` file in the project root directory. In the file, set the p

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />

<$Partial path="api_settings_steps.mdx" variables={{ "framework": "nextjs", "tab": "frameworks" }} />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ hideToc: true

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />


</StepHikeCompact.Details>

Expand Down Expand Up @@ -94,9 +94,9 @@ hideToc: true
import 'expo-sqlite/localStorage/install';

const supabaseUrl = process.env.EXPO_PUBLIC_SUPABASE_URL
const supabaseAnonKey = process.env.EXPO_PUBLIC_SUPABASE_PUBLISHABLE_KEY
const supabasePublishableKey = process.env.EXPO_PUBLIC_SUPABASE_PUBLISHABLE_KEY

export const supabase = createClient(supabaseUrl, supabaseAnonKey, {
export const supabase = createClient(supabaseUrl, supabasePublishableKey, {
auth: {
storage: localStorage,
autoRefreshToken: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ hideToc: true

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />


</StepHikeCompact.Details>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ hideToc: true

<StepHikeCompact.Details title="Initialize the Supabase client">

Open `lib/main.dart` and edit the main function to initialize Supabase using your project URL and public API (anon) key:
Open `lib/main.dart` and edit the main function to initialize Supabase using your project URL and publishable key:

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />


</StepHikeCompact.Details>

Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/guides/getting-started/quickstarts/hono.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ hideToc: true
<StepHikeCompact.Step step={3}>
<StepHikeCompact.Details title="Set up the required environment variables">

Copy the `.env.example` file to `.env` and update the values with your Supabase project URL and anon key.
Copy the `.env.example` file to `.env` and update the values with your Supabase project URL and publishable key.

Lastly, [enable anonymous sign-ins](/dashboard/project/_/auth/providers) in the Auth settings.

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />


</StepHikeCompact.Details>
<StepHikeCompact.Code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ hideToc: true

<StepHikeCompact.Details title="Initialize the Supabase client">

Create a new `Supabase.swift` file add a new Supabase instance using your project URL and public API (anon) key:
Create a new `Supabase.swift` file add a new Supabase instance using your project URL and publishable key:

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />


</StepHikeCompact.Details>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ hideToc: true

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />


</StepHikeCompact.Details>

Expand All @@ -91,7 +91,7 @@ hideToc: true

val supabase = createSupabaseClient(
supabaseUrl = "https://xyzcompany.supabase.co",
supabaseKey = "your_public_anon_key"
supabaseKey = "your_publishable_key"
) {
install(Postgrest)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ hideToc: true

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />


</StepHikeCompact.Details>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ hideToc: true

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />


</StepHikeCompact.Details>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ hideToc: true

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />


</StepHikeCompact.Details>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ hideToc: true

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />


</StepHikeCompact.Details>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ hideToc: true

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />


</StepHikeCompact.Details>

Expand Down Expand Up @@ -93,7 +93,7 @@ hideToc: true
import { createClient } from "@supabase/supabase-js";
import { createResource, For } from "solid-js";

const supabase = createClient('https://<project>.supabase.co', '<sb_publishable_... or anon key>');
const supabase = createClient('https://<project>.supabase.co', '<sb_publishable_key>');

async function getInstruments() {
const { data } = await supabase.from("instruments").select();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ hideToc: true

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />


</StepHikeCompact.Details>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ hideToc: true

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />


</StepHikeCompact.Details>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ hideToc: true

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
<ProjectConfigVariables variable="anon" />


</StepHikeCompact.Details>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ import 'package:supabase_flutter/supabase_flutter.dart';
Future<void> main() async {
await Supabase.initialize(
url: 'YOUR_SUPABASE_URL',
anonKey: 'YOUR_SUPABASE_PUBLISHABLE_KEY',
publishableKey: 'YOUR_SUPABASE_PUBLISHABLE_KEY',
);
runApp(const MyApp());
}
Expand Down Expand Up @@ -474,7 +474,7 @@ import 'package:supabase_quickstart/pages/login_page.dart';
Future<void> main() async {
await Supabase.initialize(
url: 'YOUR_SUPABASE_URL',
anonKey: 'YOUR_SUPABASE_PUBLISHABLE_KEY',
publishableKey: 'YOUR_SUPABASE_PUBLISHABLE_KEY',
);
runApp(const MyApp());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ And finally, you will also need to save **just** the `web side` environment vari
</$CodeTabs>

These variables will be exposed on the browser, and that's completely fine.
They allow your web app to initialize the Supabase client with your public anon key
They allow your web app to initialize the Supabase client with your publishable key
since we have [Row Level Security](/docs/guides/auth#row-level-security) enabled on our Database.

You'll see these being used to configure your Supabase client in `web/src/App.js`:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ SAML SSO is configured in two layers:

The login flow works as follows:

1. Your app calls `POST /sso` with a domain or provider_id
1. Your app calls `POST /auth/v1/sso` with a domain or provider_id
2. Auth generates a SAML `AuthnRequest` and returns a redirect URL to the IdP
3. The user authenticates at the IdP
4. The IdP POSTs a SAML Response to `POST /sso/saml/acs`
Expand Down
1 change: 1 addition & 0 deletions apps/docs/public/humans.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ David Weitzman
Deepthi Sigireddi
Deji I
Dennis Senn
Dimitrios Liappis
Div Arora
Divit D
Douglas Hunley
Expand Down
Loading
Loading