Mini Apps platform requires merchant to **mandatorily integrate the login flow for Mini Apps**. Essentially merchant can not have a manual sign-in process for the user. e whenever in Mini Apps user credentials are needed call the paytmFetchAuthCode JS API to get the required details. Paytm will show a popup where users can explicitly provide their consent to proceed with the flow.
The flow for the same works like this:
- User clicks on merchant's Mini Apps Icon and lands into the landing page.
- User browses the catalogue/ adds items to their cart.
- When user details are required call paytmFetchAuthCode JS APIand post user consent, login the user seamlessly.
- Once the user is logged into merchant's system, they should manage their session by dropping/managing a secure HTTPS cookie so that there is no need of the authentication steps each time the user opens the Mini Apps.
Integrating Login flow in Mini Apps below steps:-
- Calling paytmFetchAuthCode JS API at client end
- Calling getAccessToken API S2S to getAuthToken
- Calling getUserInfo API S2S to get user details of Paytm users