Title: [Plugin: WP-OpenID] logins fail when using FORCE_SSL_ADMIN
Last modified: August 19, 2016

---

# [Plugin: WP-OpenID] logins fail when using FORCE_SSL_ADMIN

 *  Resolved [cpilking](https://wordpress.org/support/users/cpilking/)
 * (@cpilking)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-openid-logins-fail-when-using-force_ssl_admin/)
 * Using WP 2.6.2, WP-OpenID 2.2.2, OpenID logins do not work when define(‘FORCE_SSL_ADMIN’,
   true); is present in wp-config.php.
 * The login will bring you to the OpenID provider’s page, collect credentials, 
   and then return you to to the WordPress login page.
 * When FORCE_SSL_ADMIN is commented out, WP-OpenID works as expected.
 * Feel free to try the site, [http://www.0x1.net/~cjp](http://www.0x1.net/~cjp),
   FORCE_SSL_ADMIN is currently on, register permitted.

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

 *  Thread Starter [cpilking](https://wordpress.org/support/users/cpilking/)
 * (@cpilking)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-openid-logins-fail-when-using-force_ssl_admin/#post-867799)
 * Ok, I figured out a patch to logic.php, it works for me, but should be treated
   as alpha.
 * The problem stems from the return_to being set based on get_option(‘home’). This
   may return a http:// URL, but when forcing ssl, we need to return to an [https://](https://wordpress.org/support/topic/plugin-wp-openid-logins-fail-when-using-force_ssl_admin/?output_format=md).
 *     ```
       --- logic.php.orig  2008-08-07 04:52:08.000000000 -0400
       +++ logic.php   2008-09-27 03:09:35.000000000 -0400
       @@ -515,6 +515,9 @@
   
               // build return_to URL
               $return_to = trailingslashit(get_option('home'));
       +       if (force_ssl_admin() || force_ssl_login()) {
       +            $return_to = preg_replace('|^http://|', 'https://', $return_to);
       +        }
               $auth_request->return_to_args['openid_consumer'] = '1';
               $auth_request->return_to_args['action'] = $action;
               if (is_array($arguments) && !empty($arguments)) {
       ```
   
 * Perhaps someone can do some more thorough testing and encorporate this into the
   next release.
 *  [Will Norris](https://wordpress.org/support/users/wnorris/)
 * (@wnorris)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-openid-logins-fail-when-using-force_ssl_admin/#post-867885)
 * this is fixed in v3.0, which will be released later today.

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

The topic ‘[Plugin: WP-OpenID] logins fail when using FORCE_SSL_ADMIN’ is closed
to new replies.

## Tags

 * [FORCE_SSL_ADMIN](https://wordpress.org/support/topic-tag/force_ssl_admin/)
 * [WP-OpenID+](https://wordpress.org/support/topic-tag/wp-openid/)

 * 2 replies
 * 2 participants
 * Last reply from: [Will Norris](https://wordpress.org/support/users/wnorris/)
 * Last activity: [17 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-openid-logins-fail-when-using-force_ssl_admin/#post-867885)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
