jmnoz
09/10/2021, 2:35 PMzakaria.chahboun
09/10/2021, 3:57 PMjmnoz
09/10/2021, 4:07 PM/route
on sucessful signinuser
09/10/2021, 4:28 PMrouter.push({
pathname: '/signin',
query: { from: router.pathname },
})
Then in your /signin onSubmit event handler, after you've sent the data to supabase.auth.signIn, you can push them back to /route like so:
if (router.query && router.query.from) {
router.push(router.query.from)
}
user
09/10/2021, 4:29 PMjmnoz
09/10/2021, 4:31 PMandregoldstein
09/10/2021, 4:46 PMjcarenza
09/10/2021, 5:51 PMsignIn()
, it always returns:
400 POST /auth/v1/token?grant_type=password
{"error":"invalid_grant","error_description":"Invalid email or password"}
signUp is working just fine, the user in the DB and session is valid. then if i signOut
and try to log in with those created credentials it errors everytime. Using the standard login code from the docsite:
const { user, session, error } = await supabase.auth.signIn({
email: emailRef.current.value,
password: passwordRef.current.value
})
I have Enable email confirmations
turned off in the settings, and the api request shows the correct credentials in the payload. Any ideas on what could be the problem?Peanut
09/11/2021, 1:30 AMPeanut
09/11/2021, 1:31 AMPeanut
09/11/2021, 1:37 AMRod
09/11/2021, 1:52 AMPeanut
09/11/2021, 1:55 AMPeanut
09/11/2021, 1:55 AMconst { data, error } = await supabase
.from('cities')
.insert([
{ name: 'The Shire', country_id: 554 }
])
Rod
09/11/2021, 1:57 AMPeanut
09/11/2021, 1:57 AMdata
contain an array which contains your record?Rod
09/11/2021, 1:57 AMRod
09/11/2021, 1:58 AMPeanut
09/11/2021, 1:58 AMdata
should be an array where each item is the record inserted (because you can insert multiple records at once)Peanut
09/11/2021, 1:59 AMLothar
09/11/2021, 2:56 AMburggraf
09/11/2021, 3:07 AMFabian B.
09/11/2021, 3:26 AMconst { data, error } = await supabase
.from('notes')
.select()
.ilike('title', `%${ val }%`)
// .or ...
but I can't get the .or to work. I tried
.or(`ilike.description.%${ val }%`)
but it won't work. Does anybody have an idea? Thanks in advance!Poypoypoy
09/11/2021, 7:34 AMFabian B.
09/11/2021, 7:45 AMtdwcks
09/11/2021, 8:48 AMname
column of an ingredients
table.
const searchIngredients = async (searchText : string) => {
const { data, error } = await supabase
.from<Ingredient>('ingredients')
.select('name')
.textSearch('name', searchText, {
type: 'phrase',
config: 'english'
})
}
But I get the error:
> Property 'textSearch' does not exist on type 'PostgrestFilterBuilder'.Fabian B.
09/11/2021, 9:22 AMtdwcks
09/11/2021, 9:25 AMFabian B.
09/11/2021, 9:35 AMtdwcks
09/11/2021, 9:38 AM1.1.2