Reputation: 311
So I have a site that uses a native app to authenticate a user. This is how it works.
I get a token and start polling the app service to check when the user has authenticated.
I use a URI appname:// to open the app for the user, and I provide a redirect link to the app, so that once the authentication is done the user is redirected back to the site.
This works perfectly fine on iOS safari, and using an anchor tag, solved the issue of opening the site in a new tab.
The problems I am facing now is when the user is using the site from Chrome for iOS.
The first problem was that the redirect link was opening in Safari instead of Chrome, however I fixed this by adding googlechrome://
before the redirect url, so having something like this googlechrome://mysite.com#anchor
However I still have the issue that googlechrome://mysite.com#anchor
always opens in a new tab, which obviously reloads the site, thus the polling would not have been started, but if I manually go back to the previous tab, the polling is still ongoing and the user is logged in.
My question is: Is there a way to use this kind of URI redirect for Chrome for iOS to open in the same tab?
Upvotes: 3
Views: 1277
Reputation: 311
I found the solution to this.
So basically if you just put googlechrome://
without specifying a url after it, this will open chrome for iOS in the current tab.
Upvotes: 4