From what i know, you can login the user on the se...
# help
m
From what i know, you can login the user on the server, and send back the token to the frontend and store it in localstorage. The , with every request, you need to use the jwt secret to decode the token and check if it is still valid, then make the query to the db to send that specific data
s
There's absolutely nothing stopping you from using something like the
pg
library on the backend and going direct to the DB with queries. Prisma, sequelize or any other ORM also work and I don't believe it's that difficult to integrate even with a framework like NestJS. If you're intending to have authed routes on your API, you may need to handle sessions inside Express - perhaps by passing the values that are typically stored in localstorage and creating a bridge to pass the values as cookies instead.
m
I did something like that with nestjs if you are interested, i can dm you the starter
r
@User Can you send a src? The way we're planning to do it right now is: - store supabase.auth.session() in the - use supabase.auth.api.getUser(session) on the backend to verify that user
m
I dm-ed you the git
r
^is there anything wrong with the way we’re currently doing it^
m
That could work. In my implementation, i wanted to get rid of supabase from the frontend
Entirely
But with the way you described, it should work alright🤔. I would like to see a repo after you do it😬. Might be better than my way of doing it