Aaron Me
09/08/2022, 1:42 AMstu
09/08/2022, 1:47 AMVincent Bernier
09/08/2022, 1:58 AMrgfx
09/08/2022, 2:56 AMortegaxc
09/08/2022, 3:39 AMLUNA
09/08/2022, 4:28 AMwhiskeywizard
09/08/2022, 7:16 AMNARCISO
09/11/2022, 12:25 PMpsql
into the Postgres database with the supabase_admin
? So that eventually I could run ALTER USER postgres SUPERUSER
before the migrationsChriss
09/08/2022, 9:08 AMDeleted User
09/08/2022, 10:00 AMShecky
09/08/2022, 10:34 AMChriss
09/08/2022, 11:24 AMdavidmaxwaterman
09/08/2022, 11:27 AMpersistSession
in an 'auth` object inside the options. Due to my browser environment not having localStorage, I'm trying to disable attempts to use it, so I'm setting persistSession
to false
. However, that doesn't stop the implementation from trying to access localStorage. Setting localStorage
to null or something doesn't help either - it actually has to be set to something 'compatible', eg what I've ended up doing:
const supabase = globalThis.supabase.createClient(supabase_url, supabase_key, {
persistSession: false,
localStorage: {
setItem: () => {},
getItem: () => {},
removeItem: () => {},
clear: () => {},
},
});
Doing the same in an auth
property as indicated in the docs, doesn't help, because of this line:
https://github.com/supabase/gotrue-js/blob/master/src/GoTrueClient.ts#L99
this.localStorage = settings.localStorage || globalThis.localStorage
In my environment attempting to access globalThis.localStorage
generates an exception:
globalThis.localStorage
Uncaught
Exception { name: "NS_ERROR_NOT_AVAILABLE", message: "", result: 2147746065, ...8<... }
It seems like subsequent uses of this.localStorage
are protected from being null
but setting it to null in the settings doesn't have any effect (and, predictably, it isn't possible to assign null
to globalThis.localStorage
), eg here:
export const getItemSynchronously = (storage: SupportedStorage, key: string): any | null => {
const value = isBrowser() && storage?.getItem(key)
https://github.com/supabase/gotrue-js/blob/master/src/lib/helpers.ts#L62
I know my environment is somewhat unusual, but it seems like this is actually a bug (since localStorage cannot be nullish).
What do you think?
[1] https://supabase.com/docs/reference/javascript/next/initializing#with-additional-parametersChriss
09/08/2022, 12:08 PMa99111cc042b477e9f22eafe7
09/08/2022, 12:41 PMLudvig
09/08/2022, 1:22 PMsupabase projects list
Now, I want to clone my project hosted on supabase, so I can do local development and then be able to push changes from there, instead of loading supabases servers while testing/developing. What are the exact commands to clone the project and then getting it to run using the cli?ecrax
09/08/2022, 1:23 PM.subscribe
method, but Insert events are only received a few seconds after the callback is triggered (and returns "SUBSCRIBED").
I am on version 2.0.0-rc.8 of the js sdk if that matters. I am also aware of "double useEffect renders" in React 18s strict mode (described here: https://github.com/supabase/realtime-js/issues/169).
Thanks in advancelanbau
09/08/2022, 1:28 PMuseEffect(() => {
if (!delayedStart) return () => null;
const subscription = supabase
.from("bids")
.on("INSERT", (payload) => {
// if (init) {
console.log("message send recieved", payload);
console.log(
"Value of old messages:",
bids,
"Value of new message:",
payload.new
);
setBids((b) => [...b, payload.new]);
setDelayedStart(false);
setTimeout(() => {
setDelayedStart(true);
}, 420);
// }
})
.subscribe((state) => {
console.log("DEBUG: subscribe", state);
});
return () => {
supabase.removeSubscription(subscription);
};
}, [delayedStart]);
amount: "12"
case_id: 1
created_at: "2022-09-08T13:24:48.99641+00:00"
id: 46
user_id: "b9d966fd-f47f-4b96-9025-55053ac6c290
Shecky
09/08/2022, 1:50 PMnooz.t
09/08/2022, 1:59 PMrlee128
09/08/2022, 2:07 PMW7T2A
09/08/2022, 2:28 PMHaus Of Alejandro
09/08/2022, 4:20 PMCory
09/08/2022, 6:59 PMaaronksaunders
09/08/2022, 7:17 PMreturn await supabaseAdmin.auth.api.inviteUserByEmail(
inviteEmailAddress.trim(),
{
redirectTo: `${process.env.SERVER_URL}/incoming-invite/`,
data: {
project: projectId,
organization: organizationId,
invitedBy,
role
},
}
);
i have deployed to netlify and set the SERVER_URL environment variable, but it is still using localhostScotty
09/08/2022, 7:39 PMDanMossa
09/08/2022, 8:13 PMmikeysee
09/09/2022, 2:11 AMHadi
09/09/2022, 2:34 AMwhiskeywizard
09/09/2022, 3:10 AM