@@ -63,10 +63,8 @@ protected function createPersonalClient(ClientRepository $clients)
6363 config ('app.name ' ).' Personal Access Client '
6464 );
6565
66- $ provider = $ this ->promptForProvider ();
67-
6866 $ client = $ clients ->createPersonalAccessClient (
69- null , $ name , 'http://localhost ' , $ provider
67+ null , $ name , 'http://localhost '
7068 );
7169
7270 $ this ->info ('Personal access client created successfully. ' );
@@ -87,7 +85,13 @@ protected function createPasswordClient(ClientRepository $clients)
8785 config ('app.name ' ).' Password Grant Client '
8886 );
8987
90- $ provider = $ this ->promptForProvider ();
88+ $ providers = array_keys (config ('auth.providers ' ));
89+
90+ $ provider = $ this ->option ('provider ' ) ?: $ this ->choice (
91+ 'Which user provider should this client use to retrieve users? ' ,
92+ $ providers ,
93+ in_array ('users ' , $ providers ) ? 'users ' : null
94+ );
9195
9296 $ client = $ clients ->createPasswordGrantClient (
9397 null , $ name , 'http://localhost ' , $ provider
@@ -150,22 +154,6 @@ protected function createAuthCodeClient(ClientRepository $clients)
150154 $ this ->outputClientDetails ($ client );
151155 }
152156
153- /**
154- * Ask the user what user provider should be used.
155- *
156- * @return string
157- */
158- protected function promptForProvider ()
159- {
160- $ providers = array_keys (config ('auth.providers ' ));
161-
162- return $ this ->option ('provider ' ) ?: $ this ->choice (
163- 'Which user provider should this client use to retrieve users? ' ,
164- $ providers ,
165- in_array ('users ' , $ providers ) ? 'users ' : null
166- );
167- }
168-
169157 /**
170158 * Output the client's ID and secret key.
171159 *
0 commit comments