- Registered a blog on wordpress.com
- Registered a developer app on wordpress.com (oauth2)
- Tested oauth2 auth flow with wordpress.com blog, it worked
- Installed latest wordpress on my own domain
- Installed Jetpack on my own domain
- Connected jetpack to wordpress.com, it worked
- Tried to authorize client to post on my own domain, it failed
The flow starts off as expected, I'm asked to select which blog I want to authorize the client to access (the wp.com blog, or the blog on my own domain). When I select the blog on my own domain, I am redirected to my domain with a sign-in page asking for authorization. I enter my username and password, and the admin panel loads with jetpack-code, jetpack-user-id, and jetpack-state parameters in the URL. Either I should not be directed to my own blog in the first place because I've already authorized the wordpress.com account to govern the blog on my own domain or after re-authorizing on my own site I should be redirected back to wordpress and then back to the client.
No errors are displayed to me, but there is a line in the error log that looks like this:
WordPress database error Duplicate entry 'jetpack_nonce_1370543379_3idHjdJNru' for key 'option_name' for query INSERT INTO wp_options
(option_name
, option_value
, autoload
) VALUES (...) made by do_action('login_form_jetpack_json_api_authorization'), call_user_func_array, Jetpack->login_form_json_api_authorization, Jetpack->verify_json_api_authorization_request, Jetpack->add_nonce.
I have tried with Jetpack 2.2.5 and 2.2