laravel 5 using oauth2-server-laravel how to create client in oauth_clients table?

723 views Asked by At

I am using the PasswordGrant, It's require client_id and client_secret params to generate access_token.

But how to create a new client for a App ?

Just make a new REST-ful API and insert it to database when App first launch?

Is this a right way to do that?

thanks.

1

There are 1 answers

0
Ivan Domenech On

You just need to insert into the table oauth_clients

DB::table('oauth_clients')->insert([
 'id' => the_id,
 'secret' => the_secret,
 'name' => the_name
]);

I hope you find it useful