Closed AaronPorts closed 5 years ago
I'm trying to reuse auth data from browser localstorage using mtproto-storage-browser and localforage, but I get AUTH_KEY_UNREGISTERED error after any api call. Checked on all 3.2.* versions.
const api = { layer: 57, initConnection: 0x69796de9, api_id: 123456, }; const server = { dev: false, webogram: true, }; const id = JSON.parse(localStorage.getItem(`localforage/dc2_auth_id`)); const key = JSON.parse(localStorage.getItem(`localforage/dc2_auth_key`)); const salt = JSON.parse(localStorage.getItem(`localforage/dc2_server_salt`)); const app = { debug: true, storage: new BrowserStorage( localforage.createInstance({ dc2_auth_id: id, dc2_auth_key: key, dc2_server_salt: salt, }), ), }; const client = MTProto({ server, api, app });
Does anyone faced similar problem?
It seems like 3.2.6 works fine despite these errors.
I'm trying to reuse auth data from browser localstorage using mtproto-storage-browser and localforage, but I get AUTH_KEY_UNREGISTERED error after any api call. Checked on all 3.2.* versions.
Does anyone faced similar problem?