Skip to content
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

bug: Trying to set the trpc context for expo #367

Closed
thegirlyoucallryan opened this issue May 17, 2023 · 2 comments
Closed

bug: Trying to set the trpc context for expo #367

thegirlyoucallryan opened this issue May 17, 2023 · 2 comments

Comments

@thegirlyoucallryan
Copy link

thegirlyoucallryan commented May 17, 2023

Provide environment information

in Next it uses Session but I do not believe next/auth and expo mix so I am not sure how to set up the context and the docs are still using next, session.

Is there anyone who can show me sample code or a repo that has used this with next and expo because I am just new to this and not understanding how to connect everything.

Describe the bug

I do not have access to session when calling from expo (i dont think) I do have an auth store in redux that has the token, userId etc that maybe I could plug in but I have no idea how or which direction to go.

Link to reproduction

https://www.prisma.io/docs/guides/other/troubleshooting-orm/help-articles/nextjs-prisma-client-monorepo

To reproduce

start a mono repo, write your schema, try to access ctx in your mutation ctx to do things like connect a new mutation to a userId in your prisma model

Additional information

No response

@RishivikramN
Copy link

You need to use the express adapter provided by the tRPC and host the backend separately. I am trying myself to do this still. I will update here once I complete it.

https://trpc.io/docs/server/adapters/express

@juliusmarminge
Copy link
Member

juliusmarminge commented May 21, 2023

next-auth doesnt support expo yet. Hopeful we can put something together once they have released v5.

I did some stuff here which sort of works, so the plan is to get some of that merged upstream in v5 #133

Im closing this as its a limitation were aware of and is documented, but hopefully we can resolve it soon enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants