Laravel 5.7 Passport oauth - Single client for multiple users
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
add a comment |
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
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
add a comment |
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
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
laravel oauth laravel-passport
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
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.
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
|
show 7 more comments
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
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
|
show 7 more comments
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.
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
|
show 7 more comments
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.
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.
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
|
show 7 more comments
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
|
show 7 more comments
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
add a comment |
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
add a comment |
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
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
answered Nov 15 '18 at 19:26
Lucas GuglielmoneLucas Guglielmone
11
11
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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