Pragy
11/18/2021, 5:09 PMpackage.json
.
That means exposing the API url and the public-key in the code repository.
Is that okay?Scott P
11/18/2021, 5:16 PMInRed
11/18/2021, 11:26 PMCREATE
your table you will need to define the foreign key. Or you can add it using an ALTER
table command.
https://www.postgresql.org/docs/current/tutorial-fk.html
I'm brand new to supabase so I don't know how to do it in the UI yet.ryexley
11/18/2021, 11:48 PMFreakDJ
11/19/2021, 2:08 AMjonny
11/19/2021, 3:30 AMryexley
11/19/2021, 3:32 AMjonny
11/19/2021, 3:33 AMryexley
11/19/2021, 3:33 AMjonny
11/19/2021, 3:35 AMFreakDJ
11/19/2021, 3:36 AMuser
11/19/2021, 11:17 AMjs
export const RequireAuth = () => {
const { user } = useUser()
const router = useRouter()
useEffect(() => {
if (!user) {
var path = router.asPath
console.log("redirecting to auth.js")
router.push({pathname: '/auth',
query: { reirectTo: path}
})
}
}, [user, router])
}
export const AuthRedirect = () => {
console.log("Redirecting from auth.js to dashboard")
const { user } = useUser()
const router = useRouter()
var redirectTo = router.query.reirectTo
if(!redirectTo){
redirectTo = "/"
}
useEffect(() => {
if (user) {
router.push(redirectTo)
}
}, [user, router])
}
As you can see it just redirects me almost instantly there and back.
https://i.imgur.com/z6xxRPR.png▾
eMeRiKa
11/19/2021, 3:33 PMEdgar
11/19/2021, 4:15 PMchipilov
11/19/2021, 5:09 PMEdgar
11/19/2021, 6:10 PMEdgar
11/19/2021, 6:11 PMEdgar
11/19/2021, 6:12 PMchipilov
11/19/2021, 6:12 PMEdgar
11/19/2021, 6:12 PMchipilov
11/19/2021, 6:12 PMXzeta
11/19/2021, 6:13 PMEdgar
11/19/2021, 6:13 PMEdgar
11/19/2021, 6:13 PMEdgar
11/19/2021, 6:14 PMchipilov
11/19/2021, 6:14 PMEdgar
11/19/2021, 6:15 PMEdgar
11/19/2021, 6:23 PMMihai
11/19/2021, 6:34 PMMihai
11/19/2021, 6:46 PM