forked from Ivasoft/mattermost-mobile
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2497cef94 | ||
|
|
39e7ffb5e1 |
@@ -113,8 +113,8 @@ android {
|
||||
applicationId "com.mattermost.rnbeta"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 165
|
||||
versionName "1.15.0"
|
||||
versionCode 166
|
||||
versionName "1.15.1"
|
||||
multiDexEnabled = true
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "x86"
|
||||
|
||||
@@ -79,6 +79,7 @@ class SSO extends PureComponent {
|
||||
error: null,
|
||||
renderWebView: false,
|
||||
jsCode: '',
|
||||
messagingEnabled: false,
|
||||
};
|
||||
|
||||
switch (props.ssoType) {
|
||||
@@ -156,16 +157,20 @@ class SSO extends PureComponent {
|
||||
|
||||
onNavigationStateChange = (navState) => {
|
||||
const {url} = navState;
|
||||
const nextState = {};
|
||||
const nextState = {
|
||||
messagingEnabled: false,
|
||||
};
|
||||
const parsed = urlParse(url);
|
||||
|
||||
if (parsed.host.includes('.onelogin.com')) {
|
||||
nextState.jsCode = oneLoginFormScalingJS;
|
||||
} else if (parsed.pathname === this.completedUrl) {
|
||||
// To avoid `window.postMessage` conflicts in any of the SSO flows
|
||||
// we enable the onMessage handler only When the webView navigates to the final SSO URL.
|
||||
nextState.messagingEnabled = true;
|
||||
}
|
||||
|
||||
if (Object.keys(nextState).length) {
|
||||
this.setState(nextState);
|
||||
}
|
||||
this.setState(nextState);
|
||||
};
|
||||
|
||||
onLoadEnd = (event) => {
|
||||
@@ -210,7 +215,7 @@ class SSO extends PureComponent {
|
||||
|
||||
render() {
|
||||
const {theme} = this.props;
|
||||
const {error, renderWebView, jsCode} = this.state;
|
||||
const {error, messagingEnabled, renderWebView, jsCode} = this.state;
|
||||
const style = getStyleSheet(theme);
|
||||
|
||||
let content;
|
||||
@@ -235,14 +240,14 @@ class SSO extends PureComponent {
|
||||
renderLoading={this.renderLoading}
|
||||
injectedJavaScript={jsCode}
|
||||
onLoadEnd={this.onLoadEnd}
|
||||
onMessage={this.onMessage}
|
||||
onMessage={messagingEnabled && this.onMessage}
|
||||
useWebKit={true}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={{flex: 1}}>
|
||||
<View style={style.container}>
|
||||
<StatusBar/>
|
||||
{content}
|
||||
</View>
|
||||
@@ -252,6 +257,9 @@ class SSO extends PureComponent {
|
||||
|
||||
const getStyleSheet = makeStyleSheetFromTheme((theme) => {
|
||||
return {
|
||||
container: {
|
||||
flex: 1,
|
||||
},
|
||||
errorContainer: {
|
||||
alignItems: 'center',
|
||||
flex: 1,
|
||||
|
||||
@@ -2527,7 +2527,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CURRENT_PROJECT_VERSION = 165;
|
||||
CURRENT_PROJECT_VERSION = 166;
|
||||
DEAD_CODE_STRIPPING = NO;
|
||||
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
|
||||
ENABLE_BITCODE = NO;
|
||||
@@ -2579,7 +2579,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CURRENT_PROJECT_VERSION = 165;
|
||||
CURRENT_PROJECT_VERSION = 166;
|
||||
DEAD_CODE_STRIPPING = NO;
|
||||
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
|
||||
ENABLE_BITCODE = NO;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.15.0</string>
|
||||
<string>1.15.1</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
@@ -34,7 +34,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>165</string>
|
||||
<string>166</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XPC!</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.15.0</string>
|
||||
<string>1.15.1</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>165</string>
|
||||
<string>166</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.15.0</string>
|
||||
<string>1.15.1</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>165</string>
|
||||
<string>166</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
Reference in New Issue
Block a user