Skip to content

Commit

Permalink
Merge pull request #334 from auth0/remove_client_validation
Browse files Browse the repository at this point in the history
Remove client_id/secret validation since it is not allowed anymore
  • Loading branch information
glena committed Aug 9, 2017
2 parents c5b4c4a + e552f02 commit b7cd324
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions lib/admin/WP_Auth0_Admin_Basic.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,18 +195,7 @@ public function basic_validation( $old_options, $input ) {
$this->add_validation_error( $error );
$completeBasicData = false;
}

if ( $completeBasicData ) {
$response = WP_Auth0_Api_Client::get_token( $input['domain'], $input['client_id'], $input['client_secret'] );

if ( $response instanceof WP_Error ) {
$error = $response->get_error_message();
$this->add_validation_error( $error );
} elseif ( 200 !== (int) $response['response']['code'] ) {
$error = __( 'The client id or secret is not valid.', WPA0_LANG );
$this->add_validation_error( $error );
}
}

return $input;
}

Expand Down

0 comments on commit b7cd324

Please sign in to comment.