sfelix-martins / passport-multiauth

Add support to multi-authentication to Laravel Passport
MIT License
288 stars 51 forks source link

Get all of the access tokens for the user relating with Provider. #101

Closed reymondkao closed 5 years ago

reymondkao commented 5 years ago

use Laravel\Passport\Passport;

trait HasMultiAuthApiTokens /**

{"result":"error","message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.oauth_access_tokens' doesn't exist (SQL: select oauth_access_tokens.* from oauth_access_tokens inner join oauth_access_token_providers on oauth_access_tokens.id = oauth_access_token_id and oauth_access_token_providers.provider = customers where oauth_access_tokens.user_id = 21 and oauth_access_tokens.user_id is not null order by created_at desc)"}

sfelix-martins commented 5 years ago

@reymondkao Please, what’s the package, laravel and laravel passport versions? Are you sure that migrate all packages tables?

reymondkao commented 5 years ago

"require": { "laravel/framework": "5.8.*", "laravel/passport": "^7.4", "smartins/passport-multiauth": "^4.1" } I have executed migrate user account and token in different database Passport::tokenModel() fix the error

sfelix-martins commented 5 years ago

@reymondkao Thanks. If you need I am available