implement Auth0 into chrome extension with one tim

2020-04-03 07:04发布

问题:

I'm making a chrome extension where I want to create a security method for my chrome extension to stop it from getting shared without me in the process

I have an idea to generate a token somewhere (usually some backend, maybe server of the website that gets user registrations/payments my website which I am building with worpress), send token via email, get email+token in extension, make a request to the webserver to verify that they're valid. This seems like a typical auth flow except the password is now the token, which is generated instead of the set by the user. In other news, I have more ideas (Extension-side prng with shared seed, can check to see if the token is within X generations for eg.)

I want to be able to sell tokens on my website which only allow one user to prevent the token from being shared.

I tried to setup the Auth0 for the chrome extension but I keep getting errors and the process doesn't lead to how I would want to be done.

youtu.be/D0M1wid1L3Q?t=353

youtu.be/D0M1wid1L3Q?t=418

is a great example of what I want to be able to do. Can anyone help me doing this? I am building my website in wordpress not hard coding it so I'm not sure on How to do this exactly

If anyone can point me in a direction of what I am supposed to do or maybe provide some code that could help me?

I tried to

npm install auth 

and put that in my manifest.json bit it doesn't work and it seems as if it doesn't do what I want.

I have found this url which might get me heading in the right direction:

https://auth0.com/docs/api-auth/tutorials/authorization-code-grant

I really appreciate the help.