Create login security for chrome extension

Create login security for chrome extension



I am creating a chrome extension and I want to add some sort of security method for it. Say if it's on the chrome web store and someone downloads it, I want an HTML to popup that asks the user for an email and a token.



I want to be able to generate tokens automatically and email them to a person so if someone wants to use my chrome extension I have to email them a special token. Then they enter the email they registered with and the token I sent.



I would like the token to be custom for every user so it cant be shared with other people as a sort of security system that prevents it from getting distributed.



When the user enters in the email and the token correctly it gets him past the login screen and they can now use the chrome extension freely The email and token can only be used once so the person can't share the email and token with another person.



I want something similar to this.



https://chrome.google.com/webstore/detail/copbot/immelbeiihmmjebckopecegbndefenjf/related



How would I go about building this? Any help is appreciated.





Do you have a requirement to not have a web server as well? Because an auth system on a webserver can be tailored to specific users, and then send the same 'unlock' token for all which activates the extension's full feature set. The extension is built to start in locked down state. There shouldn't be a leak of the token from MITM attacks because of HTTPS, I think. One other option I can think of is to use the same timed secret key sharing tech in Google Auth, where you give time sensitive passwords to users for perma activation. Is this the direction you want to go?
– snugghash
Aug 20 at 2:15





You just can't do it just client-side. What you can do is the popup to your website only... It could contain some sort of a key in the URL, to match it against a sale transaction on Google Play. I don't know what they can provide you about this. Your website will then use it to log a database entry and... And then... I suggest a quick download and install of the "missing part of the script" from your site. --- All that, just to say that you have to look for what Google Play offers. You're certainly not the first to ask for it. -- StakOverflow isn't the place for that kind of solution. ;)
– Louys Patrice Bessette
Aug 20 at 2:21





I want something similar to CopBot on the chrome web store youtu.be/D0M1wid1L3Q?t=353 ---- youtu.be/D0M1wid1L3Q?t=418 - these two videos are pretty much exactly what I want to be able to accomplish @snugghash I have a website aswell if that is what is necessary to accomplish something like this
– developer12
Aug 20 at 2:39






Hm. That video seems to indicate this flow: generate token somewhere (usually some backend, maybe server of the website that gets user registrations/payments), send token via email, get email+token in extension, make request to 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 set by the user. In other news, I have more ideas (Extension-side prng with shared seed, can check to see if token is within X generations for eg.), I'll likely post some answers as full solutions if you're interested.
– snugghash
Aug 20 at 4:13





Yes I would really appreciate the help Thank you!! @snugghash
– developer12
Aug 20 at 4:15









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Help:Category

How can temperature be calculated given relative humidity and dew point?

I have a recursive function to validate tree graph and need a return condition