chore: remove OAuth from chrome extension (#5528)
Since we can access the tokens directly from cookies of our front app, we don't require the OAuth process to fetch tokens anymore
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import { insertButtonForCompany } from '~/contentScript/extractCompanyProfile';
|
||||
import { insertButtonForPerson } from '~/contentScript/extractPersonProfile';
|
||||
import { isDefined } from '~/utils/isDefined';
|
||||
|
||||
// Inject buttons into the DOM when SPA is reloaded on the resource url.
|
||||
// e.g. reload the page when on https://www.linkedin.com/in/mabdullahabaid/
|
||||
@ -21,3 +22,12 @@ chrome.runtime.onMessage.addListener(async (message, _, sendResponse) => {
|
||||
|
||||
sendResponse('Executing!');
|
||||
});
|
||||
|
||||
chrome.storage.local.onChanged.addListener(async (store) => {
|
||||
if (isDefined(store.accessToken)) {
|
||||
if (isDefined(store.accessToken.newValue)) {
|
||||
await insertButtonForCompany();
|
||||
await insertButtonForPerson();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user