How to make authentication in the bookmark?

I want my bookmarklet to require the user to log in. Here is the idea .... I am creating an iframe for user login and showing a / c information. But I would like to get some information from the server, for example, I would like to know if the user has added this page to my server or not. So, I want to make an ajax call, but due to the same origin policy, I cannot do this with ajax. So how can I get information from an iframe?

The story looks something like this:

User web → user clicks bookmarklet → if logged in → shows “add to fav” button → user clicks the add button in fav, the URL goes to the server, the server restarts.

Web user → user clicks the bookmarklet → if not registered → shows the login button → login success → makes the stream like the previous one

Web user → user clicks bookmarklet → if registered → checks if the website is added on the server → no fav button

As you can see, only the iframe stores the registered user information.

+5
source share
1 answer

, , , . . - fasion, " CSRF" gmail.

CSRF, - /. <form> -, POST, . JavaScript .submit() , . POST CSRF ( CSRF , .).

, , OpenID gmail. , .

+1

All Articles