The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: update auth url config for preview (#30544)
Han Qiao1440bf04dc01
diff --git a/.github/workflows/config-preview.yaml b/.github/workflows/config-preview.yamldeleted file mode 100644index cca3c2d7de3..00000000000--- a/.github/workflows/config-preview.yaml+++ /dev/null@@ -1,63 +0,0 @@-name: Config (Preview)--on:- pull_request:- types:- - opened- - reopened- - synchronize- branches:- - master- paths:- - "supabase/**"- workflow_dispatch:--jobs:- wait:- runs-on: ubuntu-latest- outputs:- status: ${{ steps.check.outputs.conclusion }}- steps:- - uses: fountainhead/[email protected]- id: check- with:- checkName: Supabase- ref: ${{ github.event.pull_request.head.sha }}- token: ${{ secrets.GITHUB_TOKEN }}-- apply:- needs:- - wait- if: ${{ needs.wait.outputs.status == 'success' }}- runs-on: ubuntu-latest- env:- SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}- TF_VAR_linked_project: xguihxuzqibwxjnimxev- TF_VAR_git_branch: ${{ github.head_ref }}- TF_CLI_ARGS_apply: -target=supabase_settings.preview- defaults:- run:- working-directory: supabase/remotes- outputs:- db_user: ${{ steps.branch.outputs.user }}- db_pass: ${{ steps.branch.outputs.password }}- db_host: ${{ steps.branch.outputs.host }}- db_port: ${{ steps.branch.outputs.port }}- jwt_secret: ${{ steps.branch.outputs.jwt_secret }}- ref: ${{ steps.branch.outputs.id }}- status: ${{ steps.branch.outputs.status }}- version: ${{ steps.branch.outputs.version }}-- steps:- - uses: actions/checkout@v4- - uses: hashicorp/setup-terraform@v3- with:- terraform_wrapper: false-- - run: terraform init- - run: terraform apply -auto-approve -no-color- - id: branch- run: |- terraform output -json branch_database \- | jq -r "to_entries|map(\"\(.key)=\(.value|tostring)\")|.[]" \- >> "$GITHUB_OUTPUT"diff --git a/.github/workflows/config-production.yaml b/.github/workflows/config-production.yamldeleted file mode 100644index b7f3dd3d63c..00000000000--- a/.github/workflows/config-production.yaml+++ /dev/null@@ -1,28 +0,0 @@-name: Config (Production)--on:- push:- branches:- - master- paths:- - "supabase/remotes/**"- workflow_dispatch:--jobs:- apply:- runs-on: ubuntu-latest- env:- SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}- TF_VAR_linked_project: xguihxuzqibwxjnimxev- defaults:- run:- working-directory: supabase/remotes-- steps:- - uses: actions/checkout@v4- - uses: hashicorp/setup-terraform@v3- with:- terraform_wrapper: false-- - run: terraform init- - run: terraform apply -auto-approve -no-colordiff --git a/supabase/config.toml b/supabase/config.tomlindex 961f4351a25..12986999396 100644--- a/supabase/config.toml+++ b/supabase/config.toml@@ -30,8 +30,6 @@ port = 54323[inbucket]# Port to use for the email testing server web interface.port = 54324-smtp_port = 54325-pop3_port = 54326[storage]# The maximum file size allowed (e.g. "5MB", "500KB").@@ -42,7 +40,11 @@ file_size_limit = "50MiB"# in emails.site_url = "http://localhost:3000"# A list of *exact* URLs that auth providers are permitted to redirect to post authentication.-additional_redirect_urls = ["https://localhost:3000"]+additional_redirect_urls = [+ "https://*-supabase.vercel.app/*/*",+ "https://supabase.com/*/*",+ "http://localhost:3000/*/*",+]# How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 seconds (one# week).jwt_expiry = 3600@@ -61,7 +63,7 @@ enable_confirmations = false# Uncomment the following to use gh oAuth app locally with your own test app# to use env vars locally, run > `source ./supabase/.env && supabase [command...]`[auth.external.github]-enabled = true+enabled = falseclient_id = "env(GITHUB_CLIENT_ID)"secret = "env(GITHUB_SECRET)"# Overrides the default auth redirectUrl.diff --git a/supabase/remotes/.gitignore b/supabase/remotes/.gitignoredeleted file mode 100644index 9b8a46e692b..00000000000--- a/supabase/remotes/.gitignore+++ /dev/null@@ -1,34 +0,0 @@-# Local .terraform directories-**/.terraform/*--# .tfstate files-*.tfstate-*.tfstate.*--# Crash log files-crash.log-crash.*.log--# Exclude all .tfvars files, which are likely to contain sensitive data, such as-# password, private keys, and other secrets. These should not be part of version-# control as they are data points which are potentially sensitive and subject-# to change depending on the environment.-*.tfvars-*.tfvars.json--# Ignore override files as they are usually used to override resources locally and so-# are not checked in-override.tf-override.tf.json-*_override.tf-*_override.tf.json--# Include override files you do wish to add to version control using negated pattern-# !example_override.tf--# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan-# example: *tfplan*--# Ignore CLI configuration files-.terraformrc-terraform.rcdiff --git a/supabase/remotes/preview.tf b/supabase/remotes/preview.tfdeleted file mode 100644index 663af43d97e..00000000000--- a/supabase/remotes/preview.tf+++ /dev/null@@ -1,41 +0,0 @@-variable "git_branch" {- type = string- default = null-}--# Fetch all branches of a linked project-data "supabase_branch" "all" {- parent_project_ref = var.linked_project-}--# Import an existing branch database-import {- for_each = {- for b in data.supabase_branch.all.branches :- b.git_branch => b- if b.git_branch == var.git_branch- }- to = supabase_branch.imported[0]- id = each.value.id-}--resource "supabase_branch" "imported" {- count = length(var.git_branch[*])- parent_project_ref = var.linked_project- git_branch = var.git_branch-}--# Override auth settings for the current branch-resource "supabase_settings" "preview" {- count = length(var.git_branch[*])- project_ref = supabase_branch.imported[0].database.id-- auth = jsonencode({- site_url = "http://localhost:3001"- })-}--output "branch_database" {- value = one(supabase_branch.imported[*].database)- sensitive = true-}diff --git a/supabase/remotes/production.tf b/supabase/remotes/production.tfdeleted file mode 100644index 92a1b31140b..00000000000--- a/supabase/remotes/production.tf+++ /dev/null@@ -1,15 +0,0 @@-# Define a linked project variable as user input-variable "linked_project" {- type = string-}--# Configure api settings for the linked project-resource "supabase_settings" "production" {- project_ref = var.linked_project-- api = jsonencode({- db_schema = "public, storage, graphql_public"- db_extra_search_path = "public, extensions"- max_rows = 1000- })-}diff --git a/supabase/remotes/provider.tf b/supabase/remotes/provider.tfdeleted file mode 100644index 6fba014c65c..00000000000--- a/supabase/remotes/provider.tf+++ /dev/null@@ -1,10 +0,0 @@-terraform {- required_providers {- supabase = {- source = "supabase/supabase"- version = "~> 1.0"- }- }-}--provider "supabase" {}