K
K
k-22017-09-13 19:18:26
JavaScript
k-2, 2017-09-13 19:18:26

How to get vk token from iframe string?

How to get token from iframe address bar.
As you know iframe cannot view js.
Found a .referrer tool that can see where the visitor came from.
I thought to make it so that after loading the page with the token, the iframe would be redirected to my site and I was already able to determine where the user came from. But something got confused.
$('#ifr').attr('src','https://mail.ru'); does not work.
Or maybe there are other ways to get the address bar with the token?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Sokolov, 2017-09-13
@sergiks

No way, without rising "above" the browser:

  • extension installed in the browser;
  • a fully controlled headless browser like PhantomJS;
  • web view in your application

A
Alexander Aksentiev, 2017-09-13
@Sanasol

what token are you talking about?
Standalone? It cannot be obtained, the token is indicated through #, and this is not transmitted to the server and to the referer.
In other cases, the token is obtained in the usual way on the server and no special tricks are needed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question