perrybutler / WP-OAuth

A WordPress plugin that allows users to login or register by authenticating with an existing Google, Facebook, LinkedIn, Github, Reddit or Windows Live account via OAuth 2.0. Easily drops into new or existing sites, integrates with existing users.
GNU General Public License v2.0
97 stars 76 forks source link

Allow FORCE_SSL_ADMIN flag #43

Closed ddio closed 8 years ago

ddio commented 8 years ago

When FORCE_SSL_ADMIN defined in wp-config.php, we should overwrite $site_url scheme to https to avoid scheme inconsistency in admin page.

Reproduce procedure:

  1. Set wordpress url + site url to be http://xxx
  2. in wp-config.php, define( 'FORCE_SSL_ADMIN', true )
  3. goto http://xxx/wp-admin, it will be redirected to https://xxx/wp-admin automatically
  4. the oauth button should be href="https://xxx...." instead of "http://xxx..."