Skip to content

Commit 43c9a3b

Browse files
committed
Issue code for authorization code flow
1 parent 3d8a954 commit 43c9a3b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

inc/types/class-authorization-code.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ protected function handle_authorization_submission( $submit, Client $client, $da
1212
switch ( $submit ) {
1313
case 'authorize':
1414
// Generate authorization code and redirect back.
15-
$code = 'x';
15+
$code = $client->generate_authorization_code();
16+
if ( is_wp_error( $code ) ) {
17+
return $code;
18+
}
19+
1620
$redirect_args = array(
1721
'code' => $code,
1822
);

0 commit comments

Comments
 (0)