A
A
ARX22018-11-22 03:00:57
Laravel
ARX2, 2018-11-22 03:00:57

How to extract all data from the URL if the request is passed through "#"?

I'm trying to connect authorization (Oauth) via Yandex, I get to the moment where they send me a token by url, only the trouble is that it's not quite a GET request, but in the form: https://scatalog.ru/login/yandex/callback# access_t...
in general, through # gives me a token. And I need to get it somehow. Requst->url(), Request->fullurl() don't help, further # truncate url. I do everything as per the documentation , and still at a dead end
Help (((

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
Just A Bit, 2018-11-22
@justabit

Try via php.net/manual/ru/function.parse-url.php there is a fragment parameter.

S
Stalker_RED, 2018-11-22
@Stalker_RED

Fragment identifier , also known as location.hash , sometimes "anchor" (whatever comes after # including the character itself) is not passed to the server and remains on the browser's side.
Therefore, some parsers do not even try to process it.
But you yourself give a link to the documentation , which provides examples of how this can be done. And it's strange that you have PHP and LARAVEL in your tags. You not on the client process this link?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question