willm
06/21/2022, 4:52 PMmattjson
06/21/2022, 5:00 PMNeedle
06/21/2022, 6:13 PM87prashant
06/21/2022, 6:22 PMBicijay
06/22/2022, 12:31 AMClearyboi
06/22/2022, 2:27 AMwillm
06/22/2022, 2:48 AMDeleted User
06/22/2022, 3:02 AMClearyboi
06/22/2022, 3:24 AMNilu
06/22/2022, 4:57 AM1337
06/22/2022, 5:27 AMError: Error resetting database: ERROR: cannot drop function graphql.build_insert(jsonb,jsonb,jsonb,text) because extension pg_graphql requires it
HINT: You can drop extension pg_graphql instead.
ERROR: current transaction is aborted, commands ignored until end of transaction block
Lines of migration that causing error is:
DROP FUNCTION IF EXISTS graphql.build_insert(ast jsonb, variable_definitions jsonb, variables jsonb, parent_type text);
DROP FUNCTION IF EXISTS graphql.build_delete(ast jsonb, variable_definitions jsonb, variables jsonb, parent_type text, parent_block_name text);
DROP FUNCTION IF EXISTS graphql.build_update(ast jsonb, variable_definitions jsonb, variables jsonb, parent_type text, parent_block_name text);
DROP FUNCTION IF EXISTS graphql.cache_key(role regrole, ast jsonb, variables jsonb);
DROP TABLE IF EXISTS graphql._field CASCADE;
DROP TABLE IF EXISTS graphql._type CASCADE;
Removing them fixes issue.
Any ideas?gabthebaker
06/22/2022, 5:34 AMsupabase.auth.update()
method in the Javascript library.
My goal is to add a verified phone number to an existing user, who authenticated initially via Magic Link.
What's boggling me is that I can make it work with a test project I created, but I can't get it to work with my main project!...
In order to debug the flow, I created a very simple html page, where I included the javascript library via CDN:
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js"></script>
<script>
const supabaseUrl = 'https://{{my-project}}.supabase.co'
const supabaseKey = '{{my-anon-key}}'
const supa = supabase.createClient(supabaseUrl, supabaseKey)
</script>
With that, I'm using the browser console directly:
supa.auth.signIn({ email: 'some-test@emaill.com'})
The promise is fulfilled successfully and I receive the email with the Magic Link. Once I open the Magic Link, I'm successfully authenticated:
supa.auth.user()
shows me the user details
Then I run:
supa.auth.update({ phone: '+1{{my-phone-here}}' })
Promise fulfilled successfully and I receive the code via SMS, through my Twilio account which I connected via the dashboard. Then I run:
supa.auth.verifyOTP({ phone: '+1{{my-phone-here}}', token:'XXXXXX', type: 'phone_change' })
This promise returns an error:
error:
message: "Token has expired or is invalid"
status: 401
The Auth log on the dashboard says this:
time="2022-06-22T04:54:21Z" level=info msg="401: Token has expired or is invalid" component=api error="redirect user" method=POST path=/verify referer="http://localhost:3000/" remote_addr="98.59.249.2:30283" request_id=97983326-7a91-44bb-990b-51e0052b16a5
The crazy part is that these exact same steps work fine with another project, and I get the phone number added to the user. I can't find any difference in the settings of these two projects.
Does anybody have any idea what I'm doing wrong? Thanks!dragos
06/22/2022, 6:41 AMDankojo
06/22/2022, 7:44 AMjaitaiwan
06/22/2022, 7:55 AMStephenAlvin
06/22/2022, 8:08 AMgenta
06/22/2022, 3:30 PMNeedle
06/22/2022, 4:49 PMCarltonC
06/22/2022, 5:23 PMabaum
06/22/2022, 5:25 PM! Do you even Vim, bro?
06/22/2022, 5:29 PM.env
, but rather .env.local
? And does it make any difference at all in case of Supabase? Is it safe to expose my .env
file to the public?willm
06/22/2022, 5:53 PMyarn add supabase
different from https://github.com/supabase/cli ? I don't see a functions command in the node one.Needle
06/22/2022, 6:02 PMNin
06/22/2022, 6:45 PMjar
06/22/2022, 8:50 PMozolan
06/22/2022, 9:19 PMkreferlink
06/23/2022, 8:04 AMBoni
06/23/2022, 8:19 AMcreate or replace function get_summary(
)
returns table(
"Nombre" varchar,
"invoice_number" integer,
"invoice_total" numeric,
"part_cost" numeric,
"other_expenses" numeric
)
language plpgsql
as $$
begin
return query
select "Mecanicos"."Nombre",
count(*) as "invoice_number",
sum("Factura"."InvoiceTotal") as "invoice_total",
sum("Factura"."PartCost"::float8) as "part_cost",
sum("Factura"."OtherExpenses"::float8) as "other_expenses"
from (
select * from "Factura"
where "Factura"."FDate" between symmetric '2022-06-22' and '2022-06-24'
) as "Factura"
inner join "Mecanicos" on
"Mecanicos"."ID" = "Factura"."MechanicID"
group by "Mecanicos"."Nombre"
order by "Mecanicos"."Nombre" ASC;
end;$$
Shoki
06/23/2022, 10:03 AMjs
const { user, error, session } = await supabase.auth.signIn({
oidc: {
id_token: googleAuthSession.idToken!,
provider: "google",
nonce: "", // ? what should i pass here?
issuer: "https://accounts.google.com",
},
});
it asks for a nonce but the authentication process with google does not return this field, how am I supposed to do?ChrisPBacon
06/23/2022, 12:38 PMhref="{{.ConfirmationURL}}
but I'd like to also use something like <h2>Hello {{.User}}</h2>