Grant temporary permission during function call on registration page
What you want is not possible. Drupal does its best to prevent cross site request forgery, but same site request forgery is not even an established term.

Any candidate for a solution can be circumvented by a script that automates downloading and parsing the registration form, creating the appropriate HTTP request for the AJAX call and sending it to the server.