Skip to content

Commit fcabdbb

Browse files
authored
Merge pull request #155 from WP-API/handle-oob-correctly
Properly show verification UI during out-of-band flow
2 parents 3872b95 + 0724bef commit fcabdbb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/class-wp-rest-oauth1-ui.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,7 @@ public function page_fields() {
136136
* @return null|WP_Error Null on success, error otherwise
137137
*/
138138
public function handle_callback_redirect( $verifier ) {
139-
if ( ! empty( $this->token['callback'] ) && $this->token['callback'] === 'oob' ) {
140-
return apply_filters( 'json_oauth1_handle_callback', null, $this->token );
141-
}
142-
143-
if ( empty( $this->token['callback'] ) ) {
139+
if ( empty( $this->token['callback'] ) || $this->token['callback'] === 'oob' ) {
144140
// No callback registered, display verification code to the user
145141
login_header( __( 'Access Token', 'rest_oauth1' ) );
146142
echo '<p>' . sprintf( __( 'Your verification token is <code>%s</code>', 'rest_oauth1' ), $verifier ) . '</p>';

0 commit comments

Comments
 (0)