garyaustin
04/20/2022, 1:31 PMasyncink
04/20/2022, 6:51 PMInfrapuna
04/20/2022, 9:12 PMAfranche
04/20/2022, 10:52 PMts
const { user, error } = await client.auth.signIn({ provider: "discord" });
Everything goes pretty well in the OAuth2/OIDC flow. I'm redirected at the root of my application with the tokens: http://localhost:3000/login#access_token=[...]&provider_token=[...]&refresh_token=[...]&token_type=bearer
. Everything from there looks fine but what I'm left with is a 401 error stating Invalid authentication credentials
on an AJAX call. I'm failing to a similar case while searching on Google so I'm reaching out here to know if anyone might have run into the same issue. Thanks a lot! πScott Prins
04/21/2022, 6:33 PMconversations{
id,
created_at
}
conversation_members {
id,
user_id (FK: user.id)
conversation_id (FK: conversation.id)
joined_time,
left_time,
created_at
}
messages {
id
conversation_id (FK:conversation.id)
from_id (FK: user.id)
body,
timestamp
}
users {
id
first_name
last_name
}
I have tried this with Firebase with just a "Conversations" collection and a nested array of messages, but it was inefficient as hell and not scalable at all, so Relational database was my next option here, but I am having trouble writing the queries to make it happen effectivelygaryaustin
04/22/2022, 12:24 AMfachofacho
04/22/2022, 11:00 PMfachofacho
04/22/2022, 11:01 PMfachofacho
04/22/2022, 11:06 PMjoshcowan25
04/23/2022, 8:31 AMRyanHirsch
04/23/2022, 2:31 PMbobmolgui
04/23/2022, 3:24 PMAlbert [tox/cis]
04/23/2022, 3:25 PMAlbert [tox/cis]
04/23/2022, 3:26 PMAlbert [tox/cis]
04/23/2022, 3:26 PMauth
abovebobmolgui
04/23/2022, 3:27 PMAlbert [tox/cis]
04/23/2022, 3:27 PMAlbert [tox/cis]
04/23/2022, 3:27 PMbobmolgui
04/23/2022, 3:28 PMgaryaustin
04/23/2022, 3:30 PMLuc
04/23/2022, 6:10 PMarcavid
04/24/2022, 1:21 AMClient network socket disconnected before secure TLS connection was established
It used to work fine until yesterday.Bryson_W
04/24/2022, 5:04 AMBryson_W
04/24/2022, 5:05 AMarcavid
04/24/2022, 7:54 AMarcavid
04/24/2022, 7:55 AMarcavid
04/24/2022, 7:56 AMLuc
04/24/2022, 11:02 AMonAuthStateChanged
. Supabase also provides the same function but when I refresh the page, it doesnt log `authenticated`(for example).
ts
const onStartup = async () => {
try {
console.log(client.auth.session())
client.auth.onAuthStateChange((event, session) => {
if (event == "SIGNED_IN") {
return console.log("SIGNED_IN", session)
}
console.log("nione", session)
})
} catch (error) {
console.log(error)
}
}
How can I keep user logged in, even if i refresh the page?Bryson_W
04/24/2022, 2:41 PMBryson_W
04/24/2022, 2:42 PM