florian
08/19/2022, 9:54 AMDeleted User
08/19/2022, 1:22 PMtheuknowner
08/19/2022, 1:25 PMFloH
08/19/2022, 1:58 PMDeleted User
08/19/2022, 2:01 PMharshcut
08/19/2022, 2:13 PMnext/router
to push to /u/dashboard
if there is no error on creating user with google auth. the problem is the redirect reverts back to localhost:3000/#
on success. after then a full reload get me to /u/dashboard
.
ts
// /index.tsx (login page)
const withAuthProvider = async () => {
const { error } = await supabase.auth.signIn({ provider: 'google' })
if (error) return setToast({ text: error.message, type: 'error' })
router.push('/u/dashboard')
}
export const getServerSideProps: GetServerSideProps = async (context) => {
const { user } = await getUser(context)
if (user) return { props: {}, redirect: { destination: '/u/dashboard', permanent: false } }
return { props: {} }
}
ts
// /u/dashboard.tsx (protected page)
export const getServerSideProps: GetServerSideProps = withPageAuth({
redirectTo: '/',
async getServerSideProps(context) {
const { user } = await getUser(context)
return { props: { user } }
},
})
Thoth Trismegistus
08/19/2022, 6:26 PMThoth Trismegistus
08/19/2022, 6:46 PMMrGandalfAndhi
08/19/2022, 7:34 PMcandidosales
08/19/2022, 11:02 PMselect title from stories order by length(title) desc
uneatenauthor
08/20/2022, 12:42 AMThe Aleks
08/20/2022, 1:35 AMuneatenauthor
08/20/2022, 1:52 AMsupabase start
and expect the app to work?Zapuzu
08/20/2022, 3:47 AMPeanut
08/20/2022, 4:39 AMpsql -h db.[myid].supabase.co -p 5432 -d postgres -U postgres
psql: error: connection to server at "db.[myid].supabase.co" ([ip]), port 5432 failed: Connection timed out (0x0000274C/10060)
Is the server running on that host and accepting TCP/IP connections?
When I use DBeaver to connect it works. When I use the REST API via a web app it works. Why is the psql command not working?nahtnam
08/20/2022, 6:48 AMadarsh1021
08/20/2022, 7:50 AMuseEffect(() => {
const mySubscription = supabaseClient
.from("item")
.on("*", (payload) => {
console.log(payload);
})
.subscribe();
}
return () => mySubscription.unsubscribe();
}, []);
The issue is that the callback does not fire - there is nothing on the console. But I can see every event received when I check the websocket messages through my inspect tools.
I am pretty new to Supabase, was trying to get something working for the #870812914603413514 . I feel like this is something very small I am missing, any help would be greatly appreciated! Thanks πEquinox
08/20/2022, 10:02 AMauth.users
table or anything
apparently they're supposed to be stored in the session cookie but whenever I check for supabase.auth.session()
or the ctx.req.cookies
(in SSR) or req.cookies
I can't seem to find the sb-provider-token
indicated in the docs of the auth helper
The only tokens stored in the cookies are sb-access-token
and sb-refresh-token
maxim
08/20/2022, 10:15 AMtheuknowner
08/20/2022, 1:35 PMGiton
08/20/2022, 2:34 PMsamuele
08/20/2022, 2:48 PMgorbypark
08/20/2022, 3:01 PMMΓ‘rio Rodrigues
08/20/2022, 3:03 PMRyanR
08/20/2022, 4:21 PMGiton
08/20/2022, 5:41 PMnickreed
08/20/2022, 6:54 PMe.sh
08/20/2022, 7:27 PMcryptosi
08/20/2022, 7:28 PMCould not find a relationship between 'categories' and 'categories_parent_id_foreign' in the schema cache
gilroy
08/20/2022, 7:57 PMsupabase.auth.api.resetPasswordForEmail
which I'm assuming (since it's an api method) should only be called on a server.
This discussion kind of confirms this https://github.com/supabase/supabase/pull/7443#discussion_r907523385
I have played around with using it on the client but the redirectsTo
wont honour a hashed url (http://localhost/#/password-reset
). It just redirects to the route of my app. It works fine if I take the #
out.
I've read a little about listening for the PASSWORD_RESET
event in supabase.auth.onAuthStateChange
and then redirecting, but I've not managed to get that working yet. Surely this isn't the official solution?
Any pointers would be great...