I know similar questions was asked here before but I have tried all possible solutions but still having the problem. Please take note
- I am following instruction from https://github.com/auth0-community/auth0-chrome
- I have uploaded the extension in the chrome webstore and the public key is added and double checked menifest.json file
- I am trying auth0 login when a button clicked in popup.
new Auth0Chrome(env.AUTH0_DOMAIN, env.AUTH0_CLIENT_ID)
.authenticate(options)
.then( authResult => {
console.log(authResult);
// localStorage.authResult = JSON.stringify(authResult);
chrome.notifications.create({
type: 'basic',
iconUrl: '../icons/icon_128.png',
title: 'Login Successful',
message: 'You can use the app now',
});
}).catch( err => {
console.log(err);
chrome.notifications.create({
type: 'basic',
title: 'Login Failed',
message: err.message,
iconUrl: '../icons/icon_128.png',
});
});
Code is put inside popup.js file not in background js. I don’t think that can be an issue. But I have tried to put it in background.js which cases similar result.