stack icon indicating copy to clipboard operation
stack copied to clipboard

React Native/Expo support

Open imranbarbhuiya opened this issue 1 year ago • 3 comments

Hi, thanks for this awesome solution. Is this only limited to nextjs app router or can it be used outside of nextjs. I've an expo app where I want to use the same auth as the website one so can I use this for both website and app?

imranbarbhuiya avatar May 22 '24 15:05 imranbarbhuiya

Hey by design the core of Stack should work in mobile app environment. You just need to initialise StackClientApp instead of StackServerApp and only pass in the client keys, then all the client side functionalities should be on that object.

However, there are a few things that we still need to do to make it fully work with RN/Expo:

  • Token storage system for mobile (currently stored in cookies on web)
  • OAuth redirect URL/browser opening for mobile (it is slightly different there)

I tried once to set it up in RN/Expo but I encountered some compiling/dependency issues. I will check again later and see if there are easy fixes to it.

fomalhautb avatar May 23 '24 07:05 fomalhautb

I can probably help to implement and test this feature if you guide me on how can I proceed and what are the things we'll need to do in stack

imranbarbhuiya avatar May 23 '24 10:05 imranbarbhuiya

@imranbarbhuiya are you still working on this one

ghost avatar Jul 01 '24 12:07 ghost

Happy to re-open if any one in the community wants to make Stack work on RN

fomalhautb avatar Aug 22 '24 23:08 fomalhautb

Is there a working demo of this using React Native/Expo? Or has anyone successfully run through the process?

hubingkang avatar Aug 28 '24 05:08 hubingkang

@fomalhautb I am using stack for my project in react native, if everything goes well I would like create the react native SDK. Will comment here if and when I start working on it. Really like what you guys are doing <3

ishan-sharma-me avatar Dec 13 '24 12:12 ishan-sharma-me