I have a website on Next.js that uses the Telegram Login Widget. When a user clicks the “Login” button, a popup appears asking them to enter their mobile phone number and then waits for confirmation from the user in a Telegram dialog. After receiving the confirmation, the popup sends authentification data to my website and closes automatically.
This works well in most cases, but when the website is saved as a web app on an iOS device, after the popup closes, the last visited tab from Safari is displayed instead of my website.
At first, I thought the issue might be caused by the iframe that the widget used to display the “Login” button. However, after I rewrote the code and got rid off the iframe, the problem still persisted.
Also I tried to open the popup link in iframe but it sets ‘X-Frame-Options’ to ‘sameorigin’.
djast.in.time is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.