MM-20789 Enforce SECURE_SOFTWARE (#3647)

This commit is contained in:
Mattermost Build 2019-12-02 16:26:54 +01:00 committed by Miguel Alatzar
parent 49d9e5ef73
commit 4f3e5dac1e

View file

@ -29,7 +29,11 @@ export const setAppCredentials = (deviceToken, currentUserId, token, url) => {
EphemeralStore.deviceToken = deviceToken;
EphemeralStore.currentServerUrl = url;
AsyncStorage.setItem(CURRENT_SERVER, url);
KeyChain.setInternetCredentials(url, username, token, {accessGroup: mattermostManaged.appGroupIdentifier});
const options = {
accessGroup: mattermostManaged.appGroupIdentifier,
securityLevel: 'SECURE_SOFTWARE',
};
KeyChain.setInternetCredentials(url, username, token, options);
} catch (e) {
console.warn('could not set credentials', e); //eslint-disable-line no-console
}