Closed davidbiller closed 3 years ago
Get this error:
virgil token: eyJhbGciOiJWRURTNTEyIiwia2lkIjoiMTZlNjE4NjkxMzBiZWQ1N2ZiMmVkMThlYzJhOGY5YWMiLCJ0eXAiOiJKV1QiLCJjdHkiOiJ2aXJnaWwtand0O3Y9MSJ9.eyJpc3MiOiJ2aXJnaWwtY2hhdC1pdDJtYXRjaCIsInN1YiI6ImlkZW50aXR5LTE0IiwiaWF0IjoxNjA2MTM0NDMyLCJleHAiOjE2MDYxMzU2MzJ9.MFEwDQYJYIZIAWUDBAIDBQAEQC76zvhflnZyyc0DkPNYussdDl-Mz3IQnZXgunZEOtdephdaXDJmrPEU0Tz06Qg90bLgu5FBnwKO2Zb3jvRx-AU
[Mon Nov 23 2020 13:27:15.225] WARN Possible Unhandled Promise Rejection (id: 1): VirgilHttpError: authorization token is invalid or contains invalid field(s)
async function initVirgil() { const foo = EThree.initialize(() => getVirgilToken(), { AsyncStorage, }); console.log(foo); const eThree = await foo; const reg = await eThree.register(); console.log('await eThree.register();', reg); }
async function getVirgilToken() { const {id} = company; let res; const instance = functions().httpsCallable('virgil'); try { res = await instance({ uid: id, }); console.log('virgil token', res.data); return res.data; } catch (e) { console.error('VIRGIL ERROR', e); } }
Get this error:
virgil token: eyJhbGciOiJWRURTNTEyIiwia2lkIjoiMTZlNjE4NjkxMzBiZWQ1N2ZiMmVkMThlYzJhOGY5YWMiLCJ0eXAiOiJKV1QiLCJjdHkiOiJ2aXJnaWwtand0O3Y9MSJ9.eyJpc3MiOiJ2aXJnaWwtY2hhdC1pdDJtYXRjaCIsInN1YiI6ImlkZW50aXR5LTE0IiwiaWF0IjoxNjA2MTM0NDMyLCJleHAiOjE2MDYxMzU2MzJ9.MFEwDQYJYIZIAWUDBAIDBQAEQC76zvhflnZyyc0DkPNYussdDl-Mz3IQnZXgunZEOtdephdaXDJmrPEU0Tz06Qg90bLgu5FBnwKO2Zb3jvRx-AU
[Mon Nov 23 2020 13:27:15.225] WARN Possible Unhandled Promise Rejection (id: 1): VirgilHttpError: authorization token is invalid or contains invalid field(s)