Skip to content
  • Log In
  • Register
WordPress.org

English (Canada)

  • Themes
  • Plugins
  • News
  • About
  • Join the Team
  • Get WordPress
Get WordPress

Plugins

  • My Favourites
  • Beta Testing
  • Developers
Download

Auto Login with Cloudflare

By Kan-Ru Chen
  • Details
  • Reviews
  • Development
Support

Description

Enable Cloudflare Access self-hosted application to protect your /wp-admin folder. Add your auth domain and aud settings from Cloudflare Access. Authenticated user will be automatically logined to WordPress if their email address matches.

Follow Cloudflare document to setup Access.

You can also define configs in wp-config.php

define('WP_CF_ACCESS_AUTH_DOMAIN', 'yourdomain.cloudflareaccess.com');
define('WP_CF_ACCESS_JWT_AUD', 'examplef2nat0rkar2866wn829a0x2ztdg');
define('WP_CF_ACCESS_REDIRECT_LOGIN', true);

This plugin is not affiliated with nor developed by Cloudflare. All trademarks, service marks and company names are the property of their respective owners.

Screenshots

  • Settings

FAQ

How do I redirect the WP login page at `/wp-login.php` to Cloudflare Access?

Enable the “Redirect login page” option and all future logins will be redirected to /wp-admin and trigger Access authentication.

Why do I get infinite redirect loop after enabling the redirect login page option?

The option assumes that /wp-admin folder is protected by Cloudflare Access. If the folder is not protected, then auto-login will fail and redirect back to the login page, causing the redirect loop.

Reviews

I love this! Thank you!

cristianuibar January 31, 2022
Clean, simple, and precisely what it promises. I just configured my complete setup using Cloudflare Access with auth via AzureAD and auto-login to wp-admin. This plugin is gold! Combined with the Authenticated Origin Pulls feature of CF, this is seamlessly intertwined enterprise-level security for free.

Great Auth plugin

Alex Lion July 31, 2021
I am testing this plugin, I think Jetpack's secure login feature can be replaced with this plugin, this means I can remove Jetpack after my testing is done. Good job, thank you so much.

Thank you

N March 20, 2021 1 reply
I was close in developing this from scratch. and I was surprised this plugin is already developed. Please keep it up.
Read all 3 reviews

Contributors & Developers

“Auto Login with Cloudflare” is open source software. The following people have contributed to this plugin.

Contributors
  • kanru

“Auto Login with Cloudflare” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “Auto Login with Cloudflare” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.1.4

  • Fix redirect issue for non-default wp-admin urls

1.1.3

  • Tested with WordPress 6.1.1

1.1.2

  • Tested with WordPress 5.9
  • Fixed errors when activated in multi-site enabled installation

1.1.1

  • Show an error message when user does not exist to prevent redirect loop

1.0.0

  • Tested with WordPress 5.8
  • Update php-jwt to 5.4
  • Stable. No major change planned

0.9.3

  • Tested with WordPress 5.7

0.9.2

  • update minimum requirements
  • update php-jwt to 5.2.1

0.9.0

  • First beta release.

Meta

  • Version: 1.1.4
  • Last updated: 4 months ago
  • Active installations: 70+
  • WordPress Version: 5.0 or higher
  • Tested up to: 6.1.1
  • PHP Version: 5.3 or higher
  • Languages:

    Chinese (Taiwan) and English (US).

    Translate into your language

  • Tags:
    cloudflarejwtlogin
  • Advanced View

Ratings

See all
  • 5 stars 3
  • 4 stars 0
  • 3 stars 0
  • 2 stars 0
  • 1 star 0
Log in to submit a review.

Contributors

  • kanru

Support

Issues resolved in last two months:

0 out of 1

View support forum

Donate

Would you like to support the advancement of this plugin?

Donate to this plugin

  • About
  • News
  • Hosting
  • Donate
  • Swag
  • Documentation
  • Developers
  • Get Involved
  • Learn
  • Showcase
  • Plugins
  • Themes
  • Patterns
  • WordCamp
  • WordPress.TV
  • BuddyPress
  • bbPress
  • WordPress.com
  • Matt
  • Privacy
  • Public Code
WordPress.org
WordPress.org

English (Canada)

  • Visit our Facebook page
  • Visit our Twitter account
  • Visit our Instagram account
  • Visit our LinkedIn account
Code is Poetry