laravel-passport Questions

3

Solved

I have a problem with PHP intelephense, the method createToken is undefined. i don't know how to fix it. but when I run it in postman it works. i don't know why vscode doesnt recognize it. i also a...
Thompson asked 5/10, 2021 at 2:57

11

Solved

I'm using laravel and trying to make an Authenthication with Laravel passport. So I've done it by looking on the docs and youtube but I got this error. this is my AuthController that I requested an...
Fisc asked 11/5, 2020 at 4:30

3

Solved

I tried to use Laravel-passport so I installed this package in my project, but when i wanted to make route i wrote this code in the AuthServiceProvider public function boot() { $this->registe...
Derron asked 20/10, 2022 at 4:2

6

Solved

I have installed Laravel Passport per the documentation and I have modified all areas of my code that is required. I am working on setting up Password Grant Tokens so that users will be able to g...
Prothorax asked 30/12, 2016 at 15:54

7

Solved

i use Laravel passport for auth in route api.php Route::get('/todos', function(){ return 'hello'; })->middleware('auth:api'); but when open localhost:8000/api/todos I see the following err...
Circumfluent asked 15/3, 2018 at 8:6

5

Solved

Hello I try to do a web application and I have a problem. When I request the token from /oauth/token I receive this response: {"error":"unsupported_grant_type","message":"The authorization grant t...
Pareu asked 27/7, 2017 at 9:45

11

I was using Laravel's built-in api token authentication before but I wanted to provide multiple api tokens for different clients and with Laravel 7.x, I'm trying to migrate to Laravel Sanctum. API ...
Sibyl asked 16/7, 2020 at 19:13

8

Solved

I'm trying to test the authentication with Laravel's Passport and there's no way... always received a 401 of that client is invalid, I'll leave you what I've tried: My phpunit configuration is the...
Pederson asked 1/5, 2018 at 8:34

6

I'm using Laravel 5.8 although 6.0.3 is available. I'm using it because the tutorial I'm following is using Laravel 5.8. When, I command: composer require laravel/passport it throws an error ...
Stoke asked 5/11, 2019 at 12:47

9

Solved

I have created a new project with laravel new blogposts using "Laravel Installer 2.0.1" globally installed on my ubuntu 18. When i trying to install passport using composer require laravel/p...
Silhouette asked 23/7, 2018 at 9:11

5

Solved

My app works on Laravel 8 with laravel/passport 10.0.1. After upgrading php version on dev server from 7.4 to 8.0, I'm getting It was not possible to parse your key, reason: "" error (wit...
Insanitary asked 29/11, 2020 at 23:53

5

I've created an authentication controller using laravel passport, but the result is not what it usually is. variable $token = $user->createToken('TestApp')->accessToken; does not generate tok...
Excitor asked 22/9, 2021 at 9:9

10

Solved

I had find many tutorial this whole day. And my setup is exactly the same as all the basic tutorial out there. Currently, i'm able to access http://localhost/oauth/token with successfully return t...
Rotgut asked 23/3, 2018 at 8:46

11

I don't get what I'm doing wrong. I can't set token expiration time. <?php namespace App\Providers; class AuthServiceProvider extends ServiceProvider { public function boot() { $this->r...
Scrummage asked 5/3, 2017 at 14:16

5

Solved

Am using Laravel Passport to build an API, I removed the web routes and its guard accordingly How can I test user logout? This is what I have so far: Logout Test /** * Assert users can logout * ...
Apterygial asked 5/9, 2019 at 22:47

5

Hi i was using a cors middleware which seems to work fine until i added Laravel Passport now there is a problem with it.. it shows the error Call to undefined method Symfony\Component\HttpFounda...
Debug asked 24/4, 2017 at 16:28

3

Solved

In our app when user logs out we invalidate the access token for that particular device this way. $user = $request->user(); $value = $request->bearerToken(); $id = (new Parser())->parse(...
Pursuer asked 17/3, 2017 at 7:31

6

Solved

In my unit test, I have a user for whom I generate a token: $tokenString = $this->user->createToken('PHPunit', ['example'])->accessToken; How can I afterward delete this user's token?
Roseola asked 8/10, 2019 at 5:48

11

Solved

I'm writing a tiny sms gateway to be consumed by a couple of projects, I implemented laravel passport authentication (client credentials grant token) Then I've added CheckClientCredentials to api...
Jarman asked 23/5, 2017 at 21:9

2

Solved

I'm using Laravel 6.7 and attempting to use Passport for user authentication. I'm able to create an access token for the user when they register. Here is the code: $user = User::create($input); $...
Lavonia asked 13/12, 2019 at 22:8

4

I installed laravel passport using command compser require laravel/passsport, but after this, no new migration was made in database/migrations directory. Why is that?
Titicaca asked 30/8, 2018 at 21:51

15

Solved

So, I imported another project from Bitbucket and tried to launch it using php artisan serve, I always get this error: [LogicException] Key path "file:///var/www/html/DesignViewer5/storage/oauth...
Millesimal asked 14/3, 2017 at 19:35

2

Solved

I'm using Passport on Laravel 5.5, receiving error when trying to refresh access token - only on production server - local dev environment works fine! This is the error returned: { "error": "inva...
Carminecarmita asked 18/8, 2018 at 10:7

3

Solved

I installed jenssegers/laravel package to use mongodb in my Laravel project, but when I try to install passport I get this error : Call to a member function prepare() on null I tried to use ...
Directorial asked 23/5, 2020 at 0:9

7

I am new to Laravel. I have just started learning Laravel passport integration using this reference link. Below is my route file api.php Route::post('login', 'API\PassportController@login'); // t...
Milka asked 30/5, 2018 at 6:34

© 2022 - 2025 — McMap. All rights reserved.