-
|
Hi! I was wondering what is the purpose of the logic that refreshes the auth token if we set My guess is that it's still useful for the scenario where an API request is sent past the expiry date (e.g an API request has not been made in a while so the access token expired before there was a chance to refresh it). But just want to confirm. Different QuestionOh, another question! I notice in the OAuth example, in the client you set |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi,
Supabase is designed to be used by developers who doesn't want / can't have a backend for their front end. Remix.run purpose is to have a full stack solution and provides some utilities like "sessionCookie" to store a user session on a secure cookie (on a secure browser place), unreadable by client side javascript With this long intro in mind (:D), we now understand that everything is done server side (including refreshing user session). But their is one exception : third party auth providers (github, magic link, etc) implementing OAuth. So, it's not possible to handle that directly by a server side code and rather than making our own client side logic to parse url fragment, we rely on a client side supabase instance (it has functions to do that).
Server side doesn't need that because theses options relies on browser api (storage, event listener). That's the hard part on full stack code base with thing used client side and/or server side at the same time. It's like a giant puzzle :p |
Beta Was this translation helpful? Give feedback.
Hi,
Supabase is designed to be used by developers who doesn't want / can't have a backend for their front end.
It provides an all-in-one solution, from authentication to data storage (and now, edge functions <=> serverless api)
So, Supabase js sdk handles its own authentication logic (including refresh), client side.
Remix.run purpose is to have a full stack solution and provides some utilities like "sessionCookie" to store a user session on a secure cookie (on a secure browser place), unreadable by client side javascript
This session cookie is automatically added on re…