DEV Community

Discussion on: GraphQL Auth with Passport and Lighthouse PHP

Collapse
 
imdsolutions profile image
Oladipo George • Edited

Hi,

Have you had a chance to test a login process? I am having issues with the Passport, GraphQL and PHPUnit test. Think the initial issue was that I did not have a client login and secret in my .env file. I added a DB::table('oauth_clients')->insert at the start of the test, but it did not work. Getting "The user credentials were incorrect." (And I don't really want to be adding the DB::table('oauth_clients')->insert each time to get the user token.

Any help would be appreciated.

** UPDATE **

Ok, I have got it working.

I have called a private function for the DB::insert.