Redirect_URI is auto rendered to backend URL

Hello team,
i have an issues that when i login and successflly auth code is generated while access token is also generated the page is redirected to redirect_uri i.e - https://127.0.0.1:3001, and my backend url is also same.
i want to know that my frontend code is - https://localhost:3000; - . the page is rendered to app.get(“/”, (res,req) => console.log(“Working”) which is redirect uri.
on which platform i should write my frontend code.
frontend code - localhost:3000,
backend - https://127.0.0.1:30001 ,
i want to write frontend code where to write it


@prasanth_varghese @Pradeep_Jaiswar @shanmu

@vinod_mokashi,

Handling this scenario is a standard requirement for your application. For detailed guidance on structuring the authentication flow, I recommend reviewing the flow diagram provided at the beginning of the Authentication documentation. This resource will clearly outline the necessary steps for setting up authentication in your application. You can find this information at Upstox API Authentication Documentation.

Thank you!

yes but here is not mentioned that where to work on.
on redirect_uri or server side.
i am still confused where to render my page when i login successfully, i request you to please give me more clarified info

@vinod_mokashi,

Your application’s backend endpoint should determine the user’s destination after login. The Upstox API, upon successful authentication, redirects to the redirect_uri that you specify during app registration. Your backend server, receiving this redirection, should then guide the user to the appropriate view within your app. Consider exploring how you can transition control back to your React frontend following this backend action.

Thanks!

i am trying but its not working will u suggest me some other way.

@vinod_mokashi

Unfortunately, providing specific advice or suggestions for individual client application issues is beyond the scope of our support. For best practices and general guidance, I recommend referring to relevant documentation or seeking advice from a developer community or forum specialized in your technology stack. However, if you encounter any problems with the Upstox API itself, please feel free to write to us for assistance. Thank you for reaching out.

Thank you very sir ,
Working very smooth at both end .
Your support was valuable

I want to know while i login and doing auth process, at frontend and after login is done and we receive code with redirect uri.
but i want to know what happens at backend part- is our access token is generated automatically reads request and if code is there it will create aceess token.?
i am currently entering code manually.
is it correct or there is automatic access generated

The access token is not automatically generated. You need to obtain an auth code first, and then use this code to request an access token. For more details, please visit the Upstox API documentation at Get Token | Upstox Developer API.

I recommend reviewing the authentication documentation at Authentication | Upstox Developer API to familiarize yourself with the authentication process.