How to find referer of redirect to oauth client's callbackLaravel: API with OAuth 2.0how to handle laravel socialite “Missing authorization Exception”Laravel Passport Error - ServerException in RequestException.php line 107Laravel Passport API call code parameter nullMany questions about using Laravel PassportFacing issues while using two or more request with GuzzleHttp in laravelLaravel Guzzle Client Server synchronisationLaravel 5.6 passport Oauth Client CridentialsHow To Dynamically Request Access Token Using Passport And Laravelusing oauth in laravel gives Error: redirect_uri_mismatch

Oil draining out shortly after turbo hose detached/broke

Could a person damage a jet airliner - from the outside - with their bare hands?

Why do some devices use electrolytic capacitors instead of ceramics for small value components?

How far would a landing Airbus A380 go until it stops with no brakes?

Does putting salt first make it easier for attacker to bruteforce the hash?

The origin of the Russian proverb about two hares

Why did the World Bank set the global poverty line at $1.90?

Who is "He that flies" in Lord of the Rings?

How to write a convincing religious myth?

Why are MBA programs closing in the United States?

Use 1 9 6 2 in this order to make 75

Extracting data from Plot

To what extent do precedents in Westminster systems apply in other countries that use it?

Flat with smooth fibers implies formally smooth?

Can you make an identity from this product?

How and why do references in academic papers work?

Multiband vertical antenna not working as expected

NUL delimited variable

Why do radiation hardened IC packages often have long leads?

Why is the length of the Kelvin unit of temperature equal to that of the Celsius unit?

How can powerful telekinesis avoid violating Newton's 3rd Law?

How do we say "within a kilometer radius spherically"?

Trying to get (more) accurate readings from thermistor (electronics, math, and code inside)

Difference between prepositions in "...killed during/in the war"



How to find referer of redirect to oauth client's callback


Laravel: API with OAuth 2.0how to handle laravel socialite “Missing authorization Exception”Laravel Passport Error - ServerException in RequestException.php line 107Laravel Passport API call code parameter nullMany questions about using Laravel PassportFacing issues while using two or more request with GuzzleHttp in laravelLaravel Guzzle Client Server synchronisationLaravel 5.6 passport Oauth Client CridentialsHow To Dynamically Request Access Token Using Passport And Laravelusing oauth in laravel gives Error: redirect_uri_mismatch






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I am having trouble setting up a generic oauth client (and can't find good material on google).



I have this as my route to receive the callback from the oauth process:



Route::get('/oauth/callback', function (Request $request) 
$http = new GuzzleHttpClient;

$response = $http->post('https://www.wunderlist.com/oauth/access_token', [
'client_id' => 'xxxxxxxxxxxxxxx',
'client_secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'code' => $request->code
]);
);


but in order to make it generic, I must be able to identify where the redirect came from.
something in the lines of



$service = AppService::where(<field>, $request-><information about the referer>);


does Request contain any kind of information that can help me identify the source of the redirect? I looked at the object with dd() and couldn't find anything










share|improve this question




























    0















    I am having trouble setting up a generic oauth client (and can't find good material on google).



    I have this as my route to receive the callback from the oauth process:



    Route::get('/oauth/callback', function (Request $request) 
    $http = new GuzzleHttpClient;

    $response = $http->post('https://www.wunderlist.com/oauth/access_token', [
    'client_id' => 'xxxxxxxxxxxxxxx',
    'client_secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    'code' => $request->code
    ]);
    );


    but in order to make it generic, I must be able to identify where the redirect came from.
    something in the lines of



    $service = AppService::where(<field>, $request-><information about the referer>);


    does Request contain any kind of information that can help me identify the source of the redirect? I looked at the object with dd() and couldn't find anything










    share|improve this question
























      0












      0








      0








      I am having trouble setting up a generic oauth client (and can't find good material on google).



      I have this as my route to receive the callback from the oauth process:



      Route::get('/oauth/callback', function (Request $request) 
      $http = new GuzzleHttpClient;

      $response = $http->post('https://www.wunderlist.com/oauth/access_token', [
      'client_id' => 'xxxxxxxxxxxxxxx',
      'client_secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
      'code' => $request->code
      ]);
      );


      but in order to make it generic, I must be able to identify where the redirect came from.
      something in the lines of



      $service = AppService::where(<field>, $request-><information about the referer>);


      does Request contain any kind of information that can help me identify the source of the redirect? I looked at the object with dd() and couldn't find anything










      share|improve this question














      I am having trouble setting up a generic oauth client (and can't find good material on google).



      I have this as my route to receive the callback from the oauth process:



      Route::get('/oauth/callback', function (Request $request) 
      $http = new GuzzleHttpClient;

      $response = $http->post('https://www.wunderlist.com/oauth/access_token', [
      'client_id' => 'xxxxxxxxxxxxxxx',
      'client_secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
      'code' => $request->code
      ]);
      );


      but in order to make it generic, I must be able to identify where the redirect came from.
      something in the lines of



      $service = AppService::where(<field>, $request-><information about the referer>);


      does Request contain any kind of information that can help me identify the source of the redirect? I looked at the object with dd() and couldn't find anything







      laravel






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 24 at 21:55









      lipkaulipkau

      83




      83






















          2 Answers
          2






          active

          oldest

          votes


















          0














          You should use request()->headers->get('referer') to check the referrer url.






          share|improve this answer

























          • I should have mentioned that. Sorry. The referer header has the address of my own page: ``` "referer" => array:1 [▼ 0 => "localhost:8000/home" ] ``` as my page redirects to the service, which redirects to my callback

            – lipkau
            Mar 25 at 14:43



















          0














          I managed to work around the problem by defining the callback url so that it contains a query parameter identifying the service.



          This means that I tell the service to callback to /oauth/callback?service=XXX
          and I find it in my services table like this:



          $service = Service::where('slug', Input::get('service'))->firstOrFail();





          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55328951%2fhow-to-find-referer-of-redirect-to-oauth-clients-callback%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            You should use request()->headers->get('referer') to check the referrer url.






            share|improve this answer

























            • I should have mentioned that. Sorry. The referer header has the address of my own page: ``` "referer" => array:1 [▼ 0 => "localhost:8000/home" ] ``` as my page redirects to the service, which redirects to my callback

              – lipkau
              Mar 25 at 14:43
















            0














            You should use request()->headers->get('referer') to check the referrer url.






            share|improve this answer

























            • I should have mentioned that. Sorry. The referer header has the address of my own page: ``` "referer" => array:1 [▼ 0 => "localhost:8000/home" ] ``` as my page redirects to the service, which redirects to my callback

              – lipkau
              Mar 25 at 14:43














            0












            0








            0







            You should use request()->headers->get('referer') to check the referrer url.






            share|improve this answer















            You should use request()->headers->get('referer') to check the referrer url.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 25 at 11:09

























            answered Mar 25 at 1:16









            sentysenty

            4,233859141




            4,233859141












            • I should have mentioned that. Sorry. The referer header has the address of my own page: ``` "referer" => array:1 [▼ 0 => "localhost:8000/home" ] ``` as my page redirects to the service, which redirects to my callback

              – lipkau
              Mar 25 at 14:43


















            • I should have mentioned that. Sorry. The referer header has the address of my own page: ``` "referer" => array:1 [▼ 0 => "localhost:8000/home" ] ``` as my page redirects to the service, which redirects to my callback

              – lipkau
              Mar 25 at 14:43

















            I should have mentioned that. Sorry. The referer header has the address of my own page: ``` "referer" => array:1 [▼ 0 => "localhost:8000/home" ] ``` as my page redirects to the service, which redirects to my callback

            – lipkau
            Mar 25 at 14:43






            I should have mentioned that. Sorry. The referer header has the address of my own page: ``` "referer" => array:1 [▼ 0 => "localhost:8000/home" ] ``` as my page redirects to the service, which redirects to my callback

            – lipkau
            Mar 25 at 14:43














            0














            I managed to work around the problem by defining the callback url so that it contains a query parameter identifying the service.



            This means that I tell the service to callback to /oauth/callback?service=XXX
            and I find it in my services table like this:



            $service = Service::where('slug', Input::get('service'))->firstOrFail();





            share|improve this answer



























              0














              I managed to work around the problem by defining the callback url so that it contains a query parameter identifying the service.



              This means that I tell the service to callback to /oauth/callback?service=XXX
              and I find it in my services table like this:



              $service = Service::where('slug', Input::get('service'))->firstOrFail();





              share|improve this answer

























                0












                0








                0







                I managed to work around the problem by defining the callback url so that it contains a query parameter identifying the service.



                This means that I tell the service to callback to /oauth/callback?service=XXX
                and I find it in my services table like this:



                $service = Service::where('slug', Input::get('service'))->firstOrFail();





                share|improve this answer













                I managed to work around the problem by defining the callback url so that it contains a query parameter identifying the service.



                This means that I tell the service to callback to /oauth/callback?service=XXX
                and I find it in my services table like this:



                $service = Service::where('slug', Input::get('service'))->firstOrFail();






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 31 at 20:54









                lipkaulipkau

                83




                83



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55328951%2fhow-to-find-referer-of-redirect-to-oauth-clients-callback%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                    은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현