Title: PHP Error &#8211; undefined constant &#8216;AUTH_KEY&#8217;
Last modified: May 30, 2022

---

# PHP Error – undefined constant ‘AUTH_KEY’

 *  Resolved [diezmilseresestudio](https://wordpress.org/support/users/diezmilseresestudio/)
 * (@diezmilseresestudio)
 * [4 years ago](https://wordpress.org/support/topic/php-error-undefined-constant-auth_key/)
 * I cant complete the login to the pinterest account due to an error after pinterest
   is authenticated and I click “thats my site redirect me”

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [diezmilseresestudio](https://wordpress.org/support/users/diezmilseresestudio/)
 * (@diezmilseresestudio)
 * [4 years ago](https://wordpress.org/support/topic/php-error-undefined-constant-auth_key/#post-15692840)
 * `Fatal error: Uncaught Error: Undefined constant 'AUTH_KEY' in /home/milivanili/
   public_html/wp-content/plugins/pinterest-for-woocommerce/src/Crypto.php:37 Stack
   trace: #0 /home/milivanili/public_html/wp-content/plugins/pinterest-for-woocommerce/
   src/Crypto.php(75): Automattic\WooCommerce\Pinterest\Crypto->__construct() #1/
   home/milivanili/public_html/wp-content/plugins/pinterest-for-woocommerce/src/
   Crypto.php(113): Automattic\WooCommerce\Pinterest\Crypto::get_key() #2 /home/
   milivanili/public_html/wp-content/plugins/pinterest-for-woocommerce/class-pinterest-
   for-woocommerce.php(584): Automattic\WooCommerce\Pinterest\Crypto::encrypt('MTQ2ODQxNDoxMTM...')#
   3 /home/milivanili/public_html/wp-content/plugins/pinterest-for-woocommerce/src/
   API/Auth.php(111): Pinterest_For_Woocommerce::save_token(Array) #4 /home/milivanili/
   public_html/wp-includes/rest-api/class-wp-rest-server.php(1143): Automattic\WooCommerce\
   Pinterest\API\Auth->oauth_callback(Object(WP_REST_Request)) #5 /home/milivanili/
   public_html/wp-includes/rest-api/class-wp-rest in /home/milivanili/public_html/
   wp-content/plugins/pinterest-for-woocommerce/src/Crypto.php on line 37`
 *  Plugin Support [pepe0](https://wordpress.org/support/users/pepe0/)
 * (@pepe0)
 * [4 years ago](https://wordpress.org/support/topic/php-error-undefined-constant-auth_key/#post-15693411)
 * Hello @diezmilseresestudi
 * Probably there was an error while installing the plugin. Your AUTH_KEY was not
   properly added to wp-config.php file. To fix this you need to add it.
    Add it
   manually, this is a useful keys generator for wordpress [https://api.wordpress.org/secret-key/1.1/salt/](https://api.wordpress.org/secret-key/1.1/salt/)
   You can add the code returned by this API directly in the wp-config.php  file.
 * Let me know if that helps.
 * Best
    Pepe`
 *  Plugin Support [Christian](https://wordpress.org/support/users/christian1983/)
 * (@christian1983)
 * [4 years ago](https://wordpress.org/support/topic/php-error-undefined-constant-auth_key/#post-15713787)
 * Hey there,
 * Since we haven’t heard back from the OP in a while, I’m going to mark this as
   resolved – if you have any further questions, you can start a new thread.
 * Best,
    Christian

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP Error – undefined constant ‘AUTH_KEY’’ is closed to new replies.

 * ![](https://ps.w.org/pinterest-for-woocommerce/assets/icon.svg?rev=2619817)
 * [Pinterest for WooCommerce](https://wordpress.org/plugins/pinterest-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/pinterest-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/pinterest-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pinterest-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pinterest-for-woocommerce/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * 3 replies
 * 3 participants
 * Last reply from: [Christian](https://wordpress.org/support/users/christian1983/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/php-error-undefined-constant-auth_key/#post-15713787)
 * Status: resolved