Kite Login flow

facinick
I am building a Web App, With my own nest js backend and a react frontend that'll run in the browser. I want to understand how a typical Login flow works, I want to allow Login via kite. Kite asks for a redirectUrl, does this redirectUrl (where i receive a request token) have to be a frontend url or a backend url? I will certainly do exchange of request_token for session in the backend, but I wanted to know if there is a preferred way and why given my React Web application.

1. Receiving it on backend: I receive request_token on backend, exchange it for user session, update or create a new user in my database, generate access and refresh tokens for My app, send it back to user.
2. Receive it on frontend: I receive request_token on frontend, frontend sends it to backend, then same thing happens, access and refresh tokens sent to my frontend.

There are varied opinions on the internet hence I wanted to know specifically about kite connect and my app structure.
Sign In or Register to comment.