keithjgrant / omnibear

A Micropub browser extension
MIT License
36 stars 8 forks source link

clear localStorage syndicateTo on logout. #85

Closed dougbeal closed 1 year ago

dougbeal commented 5 years ago

Fixes#84

dougbeal commented 5 years ago

Confirmed fix by

  1. Omnibear log into https://dougbeal.com with Bridgy Publish plugin activbe
  2. Omnibear log out
  3. disable Bridgy Publish
  4. Omnibear log in
  5. Successful bridgy github syndication

(Originally published at: https://crw.moe/t/1ge)

dougbeal commented 5 years ago

This should work now, but getting an error:

Context https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map page.js:5013 (anonymous function)

_browser2.default.runtime.sendMessage({ action: ‘focus-window’, payload: { pageEntry: pageEntry, selectedEntry: selectedEntry } });

Several localStorage fail to remove

(Originally published at: https://crw.moe/t/1gw)

dougbeal commented 5 years ago

These localStorage items don’t get cleared

‘authEndpoint’, ‘tokenEndpoint’,

‘syndicateTo’,*

(Originally published at: https://crw.moe/t/1gx)

keithjgrant commented 5 years ago

Thanks for taking a look at this! Your change should work. I'll see if I can reproduce that error when I get the time.

keithjgrant commented 5 years ago

I just noticed the date on this 😖. Sorry for the delay!

grantcodes commented 5 years ago

Also just chiming in since I saw the notifications, and I may have mentioned this elsewhere, but you're not really meant to use local storage with extensions.

There is an api for storing data with extensions: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage