-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using stack-auth components without next.js #390
Comments
Not currently, we are mainly focused on Next.js right now. But we will eventually support that |
@fomalhautb I was able to create an interface nativeInterface.ts and ReactNative client in the stack-app.ts. was pretty fun to see everything work in react native, would love to contribute. Also I think it would be easy to decouple the nextjs parts like I did for it to work in react native for it to work on any js environment. there it will just default to using plain cookies. |
@ishan-sharma-me Oh wow that is super cool! Do you think you can share the code? |
Hey @ishan-sharma-me Is there any way you could share an example repo? Something that only focuses on auth, without too many bells and whistles. |
@fomalhautb hey to implement it, I needed a react native / expo app inside the stack monorepo. pnpm and turbo cause a lot of issues with react native so instead of creating a sample app inside the monorepo I instead copied over the files from stack-shared and stack packages and implemented things there. Sharing that whole repository would not be possible. I will have to make that demo app inside the stack app and then make a PR with those changes also would need to have some changes on the server side. For example I had to remove the https:// trusted domain requirement cause native apps need custom schemes for redirection / deep linking. It would be amazing if you could give me a freelance contract to implement it inside the stack repository (have my own startup, kind of struggling rn that is why I even asked otherwise wouldn't have) but even if not I will definitely implement it as and when I get free time and start pushing changes in a fork. I will write down the changes I did, Server Changes:
Dashboard Changes
React Native Interface
stack-app.ts
Redirection
You can mail me at [email protected]. I will add a link to my fork in this thread soon. |
output.mp4 |
This is very helpful. Would love to see how you implemented |
@ishan-sharma-me Thanks for sharing those incredibly helpful insights! I understand you can't share the code for your repo, maybe you can strip out the proprietary parts and leave a monorepo with just the stack files and a minimal React Native example. We could use that as a reference to implement React Native support ourselves. As for contract work, it might be a bit difficult given our current stage—we don’t have the bandwidth to onboard people and manage the added complexity right now. However, I think we should still have a chat! Sent you an email. |
@fomalhautb got it. received your mail. I will create a new repository and get back soon. |
This will create a vanilla JS version of the stack auth client. It might not be the best suitable for RN, but it is probably useful for many people already. |
We recently added React SDK https://docs.stack-auth.com/react/getting-started/setup! |
awesome! |
The stack-auth docs state:
Is there any way to use it with a different type of React app, such as vite?
The text was updated successfully, but these errors were encountered: