I've looked all over and cannot find a definitive way to safely store a JWT for an API inside a Chrome Extension.
My app allows users to log into their 3rd party account over an HTTPS connection, which then returns a token to use for further API requests.
var credentials = {
"email": username,
"password": password
};
$http({
method: 'POST',
url: 'https://api/login',
data: credentials,
headers: {
'Content-Type': 'application/json'
}
}).then(function successCallback(response) {
// Token provided here
})
What is the best and safest possible way to then store the token inside the Chrome Extension to be used for further API calls down the line?
Chrome Docs say LocalStorage and Session Storage is not secure.
I don't want users to have to login every time they open the Chrome Extension.
Any help is greatly appreciated. Thank you