Darkwebplayer
09/05/2021, 6:14 PMstibbs
09/06/2021, 1:50 AMlawrencecchen
09/06/2021, 3:54 AMlawrencecchen
09/06/2021, 4:09 AMDarkwebplayer
09/06/2021, 4:14 AMstibbs
09/06/2021, 7:54 AMstibbs
09/06/2021, 9:18 AMjason-lynx
09/06/2021, 9:30 AMjason-lynx
09/06/2021, 9:30 AMstibbs
09/06/2021, 9:39 AMjason-lynx
09/06/2021, 9:44 AMhandle_new_user()
trigger function that's recommended, if you created a public.users
tablejason-lynx
09/06/2021, 9:46 AMstibbs
09/06/2021, 9:47 AMSETY
09/06/2021, 10:11 PMlet { data, error } = await supabase.from("user_roles").select(`
id, role,
auth.users (
email
)
`);
SETY
09/06/2021, 10:12 PMSETY
09/06/2021, 10:13 PMdavitykale
09/07/2021, 12:00 AMScott P
09/07/2021, 12:09 AMjordan801
09/07/2021, 2:23 AMsupabase.from('some_table').update({some_column: 10}).match({'id': 1});
My result is:
{
error: [],
data: null,
count: null,
status: 404,
statusText: 'Not Found',
body: null
}
Not sure if this is intentional and should be handled in some particular manner, or not.jordan801
09/07/2021, 2:25 AMjordan801
09/07/2021, 2:42 AMsoedirgo
09/07/2021, 2:44 AMNeucoas
09/07/2021, 2:48 PMsql
let query = supabase.from('users').select('name')
if (name) query = query.filter('name', 'LIKE' `%${name}%`)
Neucoas
09/07/2021, 2:48 PMGHOST
09/07/2021, 2:54 PMjs
const { user, session, error } = await supabase.auth.signIn({
provider: 'discord'
})
so I do, and it redirects the user to discord and because of this user
, session
, and error
aren't actually returned? how am I supposted to handle authstibbs
09/08/2021, 3:43 AM{ user, session, error}
? After they are redirected to discord, and they log in, it should be redirecting back to your url (or localhost)mornir
09/08/2021, 6:10 PMconst { user, session, error } = await supabase.auth.signIn({
provider: 'discord'
})
// my code
console.log('run!')
When I run that function, it logs "run!" immediately and then I'm navigated away to discord.com for authentication and then I'm redirected back to my website, with the session and user data automatically set in localstorage. But I don't see how I'm supposed to get { user, session, error } directly in my JS code π€
from examples seen on blog articles, it seems that the method "supabase.auth.onAuthStateChange" is used along with supabase.auth.signIn + providermornir
09/08/2021, 6:11 PMmornir
09/08/2021, 6:13 PMmornir
09/08/2021, 6:15 PM