Hi Martin,
Ensure that you are using the latest version.
Ensure you are using MySQL. Other DB types are not supported.
Have you created a client before?
Thank you Justin!
Yes, using latest version (just installed it). Definitely using MySQL (WP instance hosted with WPEngine)?
Never created a client before, just installed the plugin.
Any other suggestions what could be the cause of the error?
Check your servers MySQL error log to see if there is an error there. The error you are receiving is presented and is contained. You can also enable https://developer.wordpress.org/reference/classes/wpdb/show_errors/ to see detailed information on screen when it happens.
Where should I place this call to wpdb::show_errors?
Ok, I found the error:
WordPress database error Table ‘wp_accapptest.wp_oauth_clients’ doesn’t exist for query SELECT * FROM wp_oauth_clients /* From [accapptest.wpengine.com/?wpoauthincludes=create&_wpnonce=cc5aa7f615] in [/nas/content/live/accapptest/wp-content/plugins/oauth2-provider/includes/functions.php:68] */ made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), apply_filters(‘template_include’), call_user_func_array, _wo_server_template_redirect_intercept, require_once(‘/plugins/oauth2-provider/library/content/create-new-client.php’), has_a_client, referer: http://accapptest.wpengine.com/?wpoauthincludes=create&_wpnonce=cc5aa7f615
For some reason the table does not exist. Are you able to check in phpmyadmin, please confirm that the table is indeed there or missing.
I have tested the latest plugin and it seems to be working as expected on activation. If the table is not in the DB, please enable wpdb error logging via a plugin and attempt the reactivate.
Check if there is any errors during or just after the plugin activation.
There is a table called wp_6_oauth_clients, but no table named wp_oauth_clients
No errors when disabling and re-activating the plugin.
Aww, I should of asked that at the beginning. WP OAuth Server is is not support for sub sites of Multisite setup. It is only support for the main blog.
Ahhh… Any plans on a version that supports multisite setups?
Yes there is a want to support multisite. There is a lot of work that needs to happen in order for multisite support to happen but it is on the board in the near future.