From f81c8c1a67190856b4676e0cf05d8b2206fb79ea Mon Sep 17 00:00:00 2001 From: Wojciech Barcik <wbarcik@syncad.com> Date: Thu, 6 Jun 2024 14:19:40 +0200 Subject: [PATCH] Fix saving login to localStorage --- src/app/redux/UserSaga.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/redux/UserSaga.js b/src/app/redux/UserSaga.js index ffbfcc8f5..4ba10ffd3 100644 --- a/src/app/redux/UserSaga.js +++ b/src/app/redux/UserSaga.js @@ -724,10 +724,10 @@ function* saveLogin_localStorage() { const postingPubkey = posting_private ? posting_private.toPublicKey().toString() : 'none'; try { account.getIn(['active', 'key_auths']).forEach((_auth) => { - if (_auth.get(0) === postingPubkey) throw 'Login will not be saved, posting key is the same as active key'; + if (_auth.get(0) === postingPubkey && !$STM_Config.dangerously_allow_login_with_ober_key) throw 'Login will not be saved, posting key is the same as active key'; }); account.getIn(['owner', 'key_auths']).forEach((_auth) => { - if (_auth.get(0) === postingPubkey) throw 'Login will not be saved, posting key is the same as owner key'; + if (_auth.get(0) === postingPubkey && !$STM_Config.dangerously_allow_login_with_ober_key) throw 'Login will not be saved, posting key is the same as owner key'; }); } catch (e) { console.error('login_auth_err', e); -- GitLab