supabase / ssr

Supabase clients for use in server-side rendering frameworks.
MIT License
71 stars 7 forks source link

Using @supabase/ssr in Expo with API Routes #42

Closed trevorpfiz closed 1 month ago

trevorpfiz commented 3 months ago

Improve documentation

Link

https://supabase.com/docs/guides/getting-started/tutorials/with-expo-react-native https://docs.expo.dev/router/reference/api-routes/

Describe the problem

With the introduction of Expo API Routes, should we be using the @supabase/ssr package to handle auth in Expo?

Describe the improvement

I would like some clarity on the preferred pattern for auth in a project using Expo API Routes.

Aditional Context

Curious how to migrate from auth-helpers in https://github.com/supabase-community/create-t3-turbo to @supabase/ssr. Is this possible? Thanks!

J0 commented 2 months ago

Hey @trevorpfiz

Thanks for the query, migration should be similar to the serve side framework guides

Not familiar with ExpoAPI but it sounds like it's meant to act as and/or operate on a server. If it offers the equivalent of cookies or similar storage mechanism you should be able to use it.

As a final add on, SSR is an opinionated configuration of supabase-js so if using vanilla supabase-js suits your needs do feel free to use that as well. It should work fine.

Hope this helps and let us know if there are questions or concerns

J0 commented 1 month ago

Hey,

Closing for now but feel free to re-openor let us know if there are any further questions or concerns