Laravel 5.7 Passport oauth - Single client for multiple users










-2















Is there a way I could use the same OAuth client for all my users instead of using one client per user?










share|improve this question






















  • What have you tried so far? Did it work or not work? See: stackoverflow.com/help/how-to-ask

    – Victor Procure
    Nov 14 '18 at 14:53











  • I tried using the Password Grant Client for my API. I think that method will work but I still need to bypass the username and password validation as both are being validating via a Front Interface

    – Lucas Guglielmone
    Nov 15 '18 at 12:11















-2















Is there a way I could use the same OAuth client for all my users instead of using one client per user?










share|improve this question






















  • What have you tried so far? Did it work or not work? See: stackoverflow.com/help/how-to-ask

    – Victor Procure
    Nov 14 '18 at 14:53











  • I tried using the Password Grant Client for my API. I think that method will work but I still need to bypass the username and password validation as both are being validating via a Front Interface

    – Lucas Guglielmone
    Nov 15 '18 at 12:11













-2












-2








-2








Is there a way I could use the same OAuth client for all my users instead of using one client per user?










share|improve this question














Is there a way I could use the same OAuth client for all my users instead of using one client per user?







laravel oauth laravel-passport






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 14 '18 at 14:32









Lucas GuglielmoneLucas Guglielmone

11




11












  • What have you tried so far? Did it work or not work? See: stackoverflow.com/help/how-to-ask

    – Victor Procure
    Nov 14 '18 at 14:53











  • I tried using the Password Grant Client for my API. I think that method will work but I still need to bypass the username and password validation as both are being validating via a Front Interface

    – Lucas Guglielmone
    Nov 15 '18 at 12:11

















  • What have you tried so far? Did it work or not work? See: stackoverflow.com/help/how-to-ask

    – Victor Procure
    Nov 14 '18 at 14:53











  • I tried using the Password Grant Client for my API. I think that method will work but I still need to bypass the username and password validation as both are being validating via a Front Interface

    – Lucas Guglielmone
    Nov 15 '18 at 12:11
















What have you tried so far? Did it work or not work? See: stackoverflow.com/help/how-to-ask

– Victor Procure
Nov 14 '18 at 14:53





What have you tried so far? Did it work or not work? See: stackoverflow.com/help/how-to-ask

– Victor Procure
Nov 14 '18 at 14:53













I tried using the Password Grant Client for my API. I think that method will work but I still need to bypass the username and password validation as both are being validating via a Front Interface

– Lucas Guglielmone
Nov 15 '18 at 12:11





I tried using the Password Grant Client for my API. I think that method will work but I still need to bypass the username and password validation as both are being validating via a Front Interface

– Lucas Guglielmone
Nov 15 '18 at 12:11












2 Answers
2






active

oldest

votes


















0














If you use the Password Grant Client you can pass a username and password to the client and it will authenticate your users with only one client.



To protect your routes use the auth middleware and the api guard.



Remember to set the driver for your api guard to passport.



https://laravel.com/docs/5.7/passport#password-grant-tokens



Use this link to help you.






share|improve this answer























  • I need that exact same thing, but avoiding the username and password request, as I validate those two via front.

    – Lucas Guglielmone
    Nov 14 '18 at 15:55











  • Are you attempting to build a token based api?

    – James Cook
    Nov 14 '18 at 16:01











  • Yes sir. Sorry if I wasnt clear enough

    – Lucas Guglielmone
    Nov 15 '18 at 12:09











  • How are you validating the username & password already? If you use the Password Grant client then that will provide you with an access token you can use to make requests.

    – James Cook
    Nov 15 '18 at 14:22











  • Via a front-end login. I need to use the same client "ID" and client "Secret" for all of my current users. At the moment, my project works fine if I use one client per user, but what I strictly need is to use the SAME passport client for all of my users. Is that possible?

    – Lucas Guglielmone
    Nov 15 '18 at 14:33


















0














There must be an issue when creating a client via front end.



I ran



php artisan migrate:fresh --seed
composer dump-autoload
php artisan config:clear


Then created a user manually.



next



php artisan passport:client





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%2f53302602%2flaravel-5-7-passport-oauth-single-client-for-multiple-users%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














    If you use the Password Grant Client you can pass a username and password to the client and it will authenticate your users with only one client.



    To protect your routes use the auth middleware and the api guard.



    Remember to set the driver for your api guard to passport.



    https://laravel.com/docs/5.7/passport#password-grant-tokens



    Use this link to help you.






    share|improve this answer























    • I need that exact same thing, but avoiding the username and password request, as I validate those two via front.

      – Lucas Guglielmone
      Nov 14 '18 at 15:55











    • Are you attempting to build a token based api?

      – James Cook
      Nov 14 '18 at 16:01











    • Yes sir. Sorry if I wasnt clear enough

      – Lucas Guglielmone
      Nov 15 '18 at 12:09











    • How are you validating the username & password already? If you use the Password Grant client then that will provide you with an access token you can use to make requests.

      – James Cook
      Nov 15 '18 at 14:22











    • Via a front-end login. I need to use the same client "ID" and client "Secret" for all of my current users. At the moment, my project works fine if I use one client per user, but what I strictly need is to use the SAME passport client for all of my users. Is that possible?

      – Lucas Guglielmone
      Nov 15 '18 at 14:33















    0














    If you use the Password Grant Client you can pass a username and password to the client and it will authenticate your users with only one client.



    To protect your routes use the auth middleware and the api guard.



    Remember to set the driver for your api guard to passport.



    https://laravel.com/docs/5.7/passport#password-grant-tokens



    Use this link to help you.






    share|improve this answer























    • I need that exact same thing, but avoiding the username and password request, as I validate those two via front.

      – Lucas Guglielmone
      Nov 14 '18 at 15:55











    • Are you attempting to build a token based api?

      – James Cook
      Nov 14 '18 at 16:01











    • Yes sir. Sorry if I wasnt clear enough

      – Lucas Guglielmone
      Nov 15 '18 at 12:09











    • How are you validating the username & password already? If you use the Password Grant client then that will provide you with an access token you can use to make requests.

      – James Cook
      Nov 15 '18 at 14:22











    • Via a front-end login. I need to use the same client "ID" and client "Secret" for all of my current users. At the moment, my project works fine if I use one client per user, but what I strictly need is to use the SAME passport client for all of my users. Is that possible?

      – Lucas Guglielmone
      Nov 15 '18 at 14:33













    0












    0








    0







    If you use the Password Grant Client you can pass a username and password to the client and it will authenticate your users with only one client.



    To protect your routes use the auth middleware and the api guard.



    Remember to set the driver for your api guard to passport.



    https://laravel.com/docs/5.7/passport#password-grant-tokens



    Use this link to help you.






    share|improve this answer













    If you use the Password Grant Client you can pass a username and password to the client and it will authenticate your users with only one client.



    To protect your routes use the auth middleware and the api guard.



    Remember to set the driver for your api guard to passport.



    https://laravel.com/docs/5.7/passport#password-grant-tokens



    Use this link to help you.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 14 '18 at 15:36









    James CookJames Cook

    20829




    20829












    • I need that exact same thing, but avoiding the username and password request, as I validate those two via front.

      – Lucas Guglielmone
      Nov 14 '18 at 15:55











    • Are you attempting to build a token based api?

      – James Cook
      Nov 14 '18 at 16:01











    • Yes sir. Sorry if I wasnt clear enough

      – Lucas Guglielmone
      Nov 15 '18 at 12:09











    • How are you validating the username & password already? If you use the Password Grant client then that will provide you with an access token you can use to make requests.

      – James Cook
      Nov 15 '18 at 14:22











    • Via a front-end login. I need to use the same client "ID" and client "Secret" for all of my current users. At the moment, my project works fine if I use one client per user, but what I strictly need is to use the SAME passport client for all of my users. Is that possible?

      – Lucas Guglielmone
      Nov 15 '18 at 14:33

















    • I need that exact same thing, but avoiding the username and password request, as I validate those two via front.

      – Lucas Guglielmone
      Nov 14 '18 at 15:55











    • Are you attempting to build a token based api?

      – James Cook
      Nov 14 '18 at 16:01











    • Yes sir. Sorry if I wasnt clear enough

      – Lucas Guglielmone
      Nov 15 '18 at 12:09











    • How are you validating the username & password already? If you use the Password Grant client then that will provide you with an access token you can use to make requests.

      – James Cook
      Nov 15 '18 at 14:22











    • Via a front-end login. I need to use the same client "ID" and client "Secret" for all of my current users. At the moment, my project works fine if I use one client per user, but what I strictly need is to use the SAME passport client for all of my users. Is that possible?

      – Lucas Guglielmone
      Nov 15 '18 at 14:33
















    I need that exact same thing, but avoiding the username and password request, as I validate those two via front.

    – Lucas Guglielmone
    Nov 14 '18 at 15:55





    I need that exact same thing, but avoiding the username and password request, as I validate those two via front.

    – Lucas Guglielmone
    Nov 14 '18 at 15:55













    Are you attempting to build a token based api?

    – James Cook
    Nov 14 '18 at 16:01





    Are you attempting to build a token based api?

    – James Cook
    Nov 14 '18 at 16:01













    Yes sir. Sorry if I wasnt clear enough

    – Lucas Guglielmone
    Nov 15 '18 at 12:09





    Yes sir. Sorry if I wasnt clear enough

    – Lucas Guglielmone
    Nov 15 '18 at 12:09













    How are you validating the username & password already? If you use the Password Grant client then that will provide you with an access token you can use to make requests.

    – James Cook
    Nov 15 '18 at 14:22





    How are you validating the username & password already? If you use the Password Grant client then that will provide you with an access token you can use to make requests.

    – James Cook
    Nov 15 '18 at 14:22













    Via a front-end login. I need to use the same client "ID" and client "Secret" for all of my current users. At the moment, my project works fine if I use one client per user, but what I strictly need is to use the SAME passport client for all of my users. Is that possible?

    – Lucas Guglielmone
    Nov 15 '18 at 14:33





    Via a front-end login. I need to use the same client "ID" and client "Secret" for all of my current users. At the moment, my project works fine if I use one client per user, but what I strictly need is to use the SAME passport client for all of my users. Is that possible?

    – Lucas Guglielmone
    Nov 15 '18 at 14:33













    0














    There must be an issue when creating a client via front end.



    I ran



    php artisan migrate:fresh --seed
    composer dump-autoload
    php artisan config:clear


    Then created a user manually.



    next



    php artisan passport:client





    share|improve this answer



























      0














      There must be an issue when creating a client via front end.



      I ran



      php artisan migrate:fresh --seed
      composer dump-autoload
      php artisan config:clear


      Then created a user manually.



      next



      php artisan passport:client





      share|improve this answer

























        0












        0








        0







        There must be an issue when creating a client via front end.



        I ran



        php artisan migrate:fresh --seed
        composer dump-autoload
        php artisan config:clear


        Then created a user manually.



        next



        php artisan passport:client





        share|improve this answer













        There must be an issue when creating a client via front end.



        I ran



        php artisan migrate:fresh --seed
        composer dump-autoload
        php artisan config:clear


        Then created a user manually.



        next



        php artisan passport:client






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 15 '18 at 19:26









        Lucas GuglielmoneLucas Guglielmone

        11




        11



























            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%2f53302602%2flaravel-5-7-passport-oauth-single-client-for-multiple-users%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

            Top Tejano songwriter Luis Silva dead of heart attack at 64

            ReactJS Fetched API data displays live - need Data displayed static

            政党