Passport: Trying to get property 'secret' of non-object

Created on 3 Oct 2020  路  1Comment  路  Source: laravel/passport


  • Passport Version: 10.X
  • Laravel Version: 8.X
  • PHP Version: 7.4
  • Database Driver & Version: mysql 5.7

Description:

I am using a third-party login / password system and if ok I add a token to those users...
$user->createToken('Xpto....')->accessToken;

Well, this works very well after upgrading to Laravel 8 and Passport 10. However, some of my tests (logins) don't work now, only the one's that I am giving a token as I have mentioned above.

Steps To Reproduce:

I have setted PASSPORT_PERSONAL_ACCESS_CLIENT_ID and PASSPORT_PERSONAL_ACCESS_CLIENT_SECRET in phpunit var env.

[2020-10-02 23:06:10] tests.ERROR: Trying to get property 'secret' of non-object {"exception":"[object] (ErrorException(code: 0): Trying to get property 'secret' of non-object at /Users/miguelvieira/Projects/esolidar-api/vendor/laravel/passport/src/PersonalAccessTokenFactory.php:97)
[stacktrace]

>All comments

Hi there,

Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!

Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rudolfdobias picture rudolfdobias  路  3Comments

seriousjelly picture seriousjelly  路  3Comments

duccanh0022 picture duccanh0022  路  3Comments

mehrancodes picture mehrancodes  路  3Comments

aluferraz picture aluferraz  路  3Comments