How to get external key other than INPUT from RESTFUL request?

SSO callback my api like
Could you describe your problem in more depth?
My company has a project (named center login system) just for user login and logout. I have to combine that to my project.
When my project's user login, it redirects to the login system page. Its backend would callback my tRPC func using get request (like the url api/trpc/user.login?token=abc ) , in purpose to tell me who is login.
But tRPC url request like api/trpc/user.login?input=JSON.stringify(object).
In tRPC, I can't get query params but input
Right, I think tRPC is a bad choice for this
You’d be better off using express for the auth stuff and mount tRPC within express using the adapter for the business API
Thank for your answer. I have solved this question.
I use tRPC context and inject req and res from expressjs.
Link this question
tRPC doesn't support redirect. https://discord.com/channels/867764511159091230/1084901636146729020

The login system backend callback my url , I have to redirect to my front page in this url.
If I just use expressjs to redirect. This is redundant.I have to develop in both expressjs and tRPC. One for redirect, one for my project code.
It’s completely normal to separate your auth api and business api, but even more expected when you’re essentially implementing OpenId but want to use a non-http standard for the business api. OpenId is http oriented
I’d just pick an OpenId provider like Auth0

Looking for more? Join the community!

Recommended Posts
Cannot read properties of undefined (reading 'createTRPCReact')I'm trying to use it in an Astro project. https://github.com/Industrial/test-astro-solid/blob/main/application/octet-stream responseIm refactoring my old backend to trpc so far it was a pleasure and fairly straight forward process ❤Discriminated union handleHow Do I handle Input type if its discriminated union?? ``` export const batchTasksRouter = createHit external APIs ...I'm new to tRPC, I need to hit an external API (OpenAI) directly from the client-side. Can I still uCannot get subscription event to fireRipping my hair out here trying to get Websockets working with tRPC and Next. Everything seems to bHow to get response type depending on the input params?Simple example of a normal JS function with generics: ``` const example = <T extends unknown>(paramshow to build tRPC and Prisma with express?I am using TSC as the official docs example does. But when I use paths in tsconfig.json, It does notHow to infer types from input?When I call my procedure from the client I send an array of strings as an input. How can I infer theHow to infer types of a queryCoinsider the example `const hello = trpc.hello.useQuery();` I would like to export the type we get trpc + AWS Lambda (through cdk)Hi all, has anyone successfully integrated tRPC with AWS Lambda? My current stack is API Gateway + LIs it possible to narrow an output schema if the query optionally doesn't return all fields?I have a router procedure that has an input schema that has an optional `filter` that changes the shFetching different server url than defined in configIs it possible to access the reactQuery instance and fetch different server url? I would like to useIssue with monorepo architecture ant tRPCHi, we had an issue with batched requests that if we batch some requests they produce a TRPCClientErUsing tRPC in CRON jobsHey everyone, this might be a very stupid question, but is it possible to use tRPC inside a CRON joZod File Upload Validation with Open-Api Support?Hi guys, anyone know how to validate file upload with zod and get also open-api support?Zod validation and open-api support for File on the server?Hi guys, anyone know how to validate a File upload using zod? and also have open-api support?is context cached?If I put an object on the context that represents the User record from my database... ``` export asyJSON inferred router output not matchingHello. I have a procedure query which is returning Json from a postgresql db using Prisma. The type Best way to implement input based validation on a router procedureHi guys, bit of a noob. I have already created a 'protectedProcedure', ensuring the user is logged [Help] Turbo shared typesI have a turborepo with two apps (web and embed). web is a t3 stack and embed is a create-react-app.