I have an authorisation flow that at the end redirects to our API endpoint not to the app universal link like https://api.example.com/redirect
not the app://redirect
For now I am able to use WKWebView
to detect that redirect was done by comparing urls and if match to close WebView.
The problem is that in this approach I cannot use google login (WebView is rejected) during this flow.
I tried to use ASWebAuthenticationSession
but after redirect I am not able to detect that this redirect was done (as it hits API not the app) to close AuthenticationSession view automatically.
Is it possible at all in such case or the only way to close AS is to redirect to app universal link app://
not to the https://
?
Any help really appreciated