tincan
03/13/2023, 10:29 PMostoto
03/13/2023, 11:00 PMKremBanan
03/13/2023, 11:18 PMVengeance
03/13/2023, 11:52 PMjarnold
03/14/2023, 12:07 AMDYELbrah
03/14/2023, 12:50 AMconst { error } = await supabaseBrowserTestClient.auth.signInWithPassword({
email: adminEmail,
password: adminPassword,
});
if (error) {
throw error;
}
When we check for a session afterwards though we always get null? We need the session to persist throughout the lifetime of the jest tests. Any ideas? Thanks!
Here is how I'm defining the supabase client:
export const supabaseBrowserTestClient = createClient(
"http://localhost:54321",
"MY LOCALDB KEY IS HERE....",
{
auth: {
persistSession: true,
},
}
);Cabtn
03/14/2023, 3:02 AMAlanK
03/14/2023, 3:27 AMwhaley
03/14/2023, 5:22 AMAlwaysBlue
03/14/2023, 9:18 AMcould not resolve deno executable
Much like this discussion: https://github.com/supabase/supabase/discussions/8779
In deno.enable paths (as mentioned in post), I added supabase/functions
which makes .ts
import error go but now cmd + click
for import file path like this import { corsHeaders } from '../_shared/cors.ts';
doesn't work.
infact `cmd+click`doesn't work for anything besides import { serve } from 'https://deno.land/std@0.168.0/http/server.ts';
the path with import statements like this (can only click this path import { serve } from 'https://deno.land/std@0.168.0/http/server.ts';
)
literally, some documentation and support for this would be very helpful.K0stas
03/14/2023, 9:45 AMlimitlessloop
03/14/2023, 11:16 AMjs
let { data, error } = await supabase
.from('categories')
.select('name, products(name)')
But so far this only works for one level of categories.
Any tips or advice would be greatly appreciated. Thank you.
https://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/xax948
03/14/2023, 11:27 AMMaarten
03/14/2023, 11:45 AMdelete
all rows from a table where a column value does not match a value from an array. I tried using delete().match().not()
but it throws an error:
typescript
const statsToKeep = ['id-1', 'id-2']
await table.delete().match({ user_id: userId }).not('COLUMN_NAME', 'in', statsToKeep);
// result:
{
code: 'PGRST100',
details: 'unknown single value operator not',
hint: null,
message: '"failed to parse filter (not.in.id-1,id-2)" (line 1, column 5)'
}
Any ideas how to fix this?Roko
03/14/2023, 12:18 PMtypescript
<script lang="ts">
import type { PageData } from './$types';
export let data: PageData; // <- data variable name is used here
let loadedData = [];
async function loadData() {
// ⬇ new data variable is created as const again
const { data } = await data.supabase.from('test').select('*').limit(20);
// ⇧ Old data variable is beign tried to access
// Should be deconstructed into a different name
loadedData = data;
}
$: if (data.session) {
loadData();
}
</script>
{#if data.session}
<p>client-side data fetching with RLS</p>
<pre>{JSON.stringify(loadedData, null, 2)}</pre>
{/if}
おまど
03/14/2023, 1:14 PMconst { data, error } = await supabase.auth.signInWithOAuth({
provider: 'twitter',
})
2. Transition to TwitterAPI, authenticate
3. Redirect to my service
4. Get session information with the following codes
supabase.auth.getSession().then(({data: { session }}) => {
console.log("getSession()", session))
})
Thanks to the convenient supabase, 1~3 could really be implemented in an instant.
However, only the last one 4. doesn't work, and the value of session is null.
What I checked.
* After 1, no errors occurred.
* After 4, the value remains null even after reloading.
* There is no session information in the cookies.
* Test to change the redirection to google.com, and it was redirected correctly.
* The user is not added to [https://app.supabase.com/project -> Authentication -> Manage -> Users]. (It adds automatically doesn't it?)
* I asked ChatGPT but he was not helpful.
Environment.
* "@supabase/supabase-js":"^2.10.0",
* Expo (React Native).
* Project run on localhost
Best regards.PeterSon
03/14/2023, 1:14 PMJackBiscuits
03/14/2023, 1:36 PMconst { data, error } = await supabase.auth.signUp({
email: 'example@email.com',
password: 'example-password',
})
what is missing to make a full page with sign-up and email confirmation?aoakalin
03/14/2023, 2:26 PMrogie
03/14/2023, 2:54 PMclientStorage
happens to be async. Supabase seems to be having a problem with that async implementation, or is it something I am doing wrong?
I setup supabase like so:
const supabase = createClient(
'https://xxxxxxxxx.supabase.co',
'xxxxx'
{
auth: {
storage: clientStorage
}
}
)
Then, my clientStorage
looks like this:
export default {
async setItem(key, value) {
return await FigmaScene.setClientStorage(key, value)
},
async getItem(key) {
return await FigmaScene.getClientStorage(key)
},
async removeItem(key) {
return await FigmaScene.deleteClientStorage(key)
}
}
Does supabase support async functions for storage?Neelay
03/14/2023, 3:37 PMkonga
03/14/2023, 3:38 PMchildhood
03/14/2023, 3:57 PMVictor G
03/14/2023, 4:05 PMMike92988
03/14/2023, 4:17 PMDontblink
03/14/2023, 4:25 PMtheravenstone
03/14/2023, 4:51 PMsubhranshu
03/14/2023, 5:03 PMWee
03/14/2023, 5:27 PMdoingItAll
03/14/2023, 5:48 PM