2

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.

Swati
  • 2,870
  • 7
  • 45
  • 87
refear99
  • 1,217
  • 3
  • 10
  • 13
  • 1
    Typically the client would already exist in the database and user authenticates themselves with a specific client. You don't want to have a new client record in the database for every user that authenticates themselves with your application. – Johnathan Barrett Nov 27 '15 at 14:56

1 Answers1

0

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