I wrote an extension for Google Chrome, and it works.

The popup.html file popup.html lines with the connection of <script></script> scripts, which will further add functionality to certain pages. Now I want to make it so that only registered users on my site could use the functionality of the extension. To do this, it is enough to make an ajax request for one page and get an answer about whether there is a user in the database.

If there is no user, then you need to make sure that the extension does not work, and when viewing the contents of popup.html , so that there are neither links, nor any hints on my scripts.

How to give full access to registered users on my site, and completely deprive not registered?

I need only competent instructions, and I will write the code myself.

  • Вариант 1 . Obfuscation code. Ie confuse it, make it obscure. Вариант 2 . Native Client . This is a sandbox for running compiled C / C ++ code. Ie rewrite the extension in C ++ for example. - UserName
  • Вариант 3 . Transfer part of the logic to the server. - UserName

1 answer 1

I need only competent instructions, and I will write the code myself.

Well, write)) You yourself answered:

To do this, it is enough to make ajax request for one page and get an answer about whether there is a user in the database.

You make a request to the site, check if there is a user with login and password in the database, if there is, then you answer OK and return the token for authorization in the future. If not in the database, then you answer NOT OK and output a hint, they say, register and all that.

  • The user can easily change this place in the code. And if you give the script, then Google will not miss the extension to the store. So something dubious recommendation. - Qwertiy