Authentication: Redirect webview (SSO) javascript logs to native logs

This commit is contained in:
manuroe
2020-06-03 14:01:39 +02:00
parent 3a76f14b5d
commit a2ee225d00
2 changed files with 4 additions and 0 deletions
@@ -56,6 +56,9 @@ NSString *FallBackViewControllerJavascriptOnLogin = @"window.matrixLogin.onLogin
{
[super viewDidLoad];
// Catch js logs
[self enableDebug];
// Due to https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html, we hack
// the user agent to bypass the limitation of Google, as a quick fix (a proper solution will be to use the SSO SDK)
webView.customUserAgent = @"Mozilla/5.0";