added note to getUser method in sc2 login

This commit is contained in:
noumantahir 2023-06-17 22:26:04 +05:00
parent abed24b4e8
commit 411ee5b77b

View File

@ -130,6 +130,9 @@ export const loginWithSC2 = async (code) => {
const scTokens = await getSCAccessToken(code);
hsApi.setAccessToken(get(scTokens, 'access_token', ''));
const scAccount = await hsApi.me();
//NOTE: even though sAccount.account has account data but there are certain properties missing from hsApi variant, for instance account.username
//that is why we still have to fetch account data using dhive, thought post processing done in dhive variant can be done in utils in future
const account = await getUser(scAccount.account.name);
let avatar = '';