{"id":411598,"date":"2026-11-30T17:59:21","date_gmt":"2026-11-30T17:59:21","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/auto-login-for-cloudflare-access\/"},"modified":"2026-11-30T19:04:33","modified_gmt":"2026-11-30T19:04:33","slug":"auto-login-for-cloudflare-access","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/auto-login-for-cloudflare-access\/","author":23611631,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.1","stable_tag":"1.0.1","tested":"7.1.5","requires":"6.3","requires_php":"8.0","requires_plugins":null,"header_name":"Auto Login for Cloudflare Access","header_author":"Johannes Kistemaker","header_description":"Log users in to WordPress automatically when they have signed in through Cloudflare Access.","last_updated":"2026-11-30 19:04:33","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/johanneswk\/auto-login-for-cloudflare-access","header_author_uri":"https:\/\/github.com\/johanneswk\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":56,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"johanneswk","date":"2026-11-30 17:59:05","revision":3835809},"1.0.1":{"tag":"1.0.1","author":"johanneswk","date":"2026-11-30 19:04:33","revision":3835964}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3835916,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3835916,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256},"icon.svg":{"filename":"icon.svg","revision":3835916,"resolution":false,"location":"assets","locale":false}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"Settings page with debug mode and the debug log."}},"plugin_section":[],"plugin_tags":[296634,38851,602,2469,202163],"plugin_category":[38],"plugin_contributors":[296635],"plugin_business_model":[],"class_list":["post-411598","plugin","type-plugin","status-publish","hentry","plugin_tags-cloudflare-access","plugin_tags-jwt","plugin_tags-login","plugin_tags-sso","plugin_tags-zero-trust","plugin_category-authentication","plugin_contributors-johanneswk","plugin_committers-johanneswk"],"banners":[],"icons":{"svg":"https:\/\/ps.w.org\/auto-login-for-cloudflare-access\/assets\/icon.svg?rev=3835916","icon":"https:\/\/ps.w.org\/auto-login-for-cloudflare-access\/assets\/icon.svg?rev=3835916","icon_2x":false,"generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Protect <code>\/wp-admin<\/code> (or your whole site) with a Cloudflare Access self-hosted application. When a visitor has signed in through Access, this plugin verifies the Access token (JWT) that Cloudflare sends with every request and logs the visitor in to the WordPress account with the same email address.<\/p>\n\n<ul>\n<li>No passwords: users sign in with any identity provider configured in Cloudflare Access.<\/li>\n<li>Strict token validation: RS256 signature against Cloudflare's published keys, expiry, audience (AUD) and issuer are all checked.<\/li>\n<li>Handles Cloudflare's signing key rotation automatically.<\/li>\n<li>Optional redirect of <code>wp-login.php<\/code> to Cloudflare Access, and logout from Access when logging out of WordPress.<\/li>\n<li>Built-in debug log on the settings page for troubleshooting.<\/li>\n<li>Settings can be locked in <code>wp-config.php<\/code>.<\/li>\n<\/ul>\n\n<p>Users are never created: the email address must already belong to a WordPress user.<\/p>\n\n<p>This plugin is a fork of \"Auto Login with Cloudflare\" by Kan-Ru Chen, which is no longer available. When you activate this plugin, the settings of that plugin are copied over; deactivate and delete the old plugin afterwards.<\/p>\n\n<p>This plugin is not affiliated with or endorsed by Cloudflare, Inc. Cloudflare and Cloudflare Access are trademarks of Cloudflare, Inc.<\/p>\n\n<p>Development happens on <a href=\"https:\/\/github.com\/johanneswk\/auto-login-for-cloudflare-access\">GitHub<\/a>.<\/p>\n\n<h3>External services<\/h3>\n\n<p>This plugin connects to Cloudflare Access, a service by Cloudflare, Inc., to verify that a visitor has signed in.<\/p>\n\n<p>When a request carries a Cloudflare Access token, the plugin downloads the public signing keys of your Access team from <code>https:\/\/&lt;your auth domain&gt;\/cdn-cgi\/access\/certs<\/code>. The keys are cached for up to one hour. Only this request is made; no visitor or site data is sent to Cloudflare by the plugin. Your site is already behind Cloudflare Access, which handles the sign-in itself.<\/p>\n\n<ul>\n<li>Cloudflare Website and Online Services Terms of Use: https:\/\/www.cloudflare.com\/website-terms\/<\/li>\n<li>Cloudflare Privacy Policy: https:\/\/www.cloudflare.com\/privacypolicy\/<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>In Cloudflare Zero Trust, create a self-hosted Access application that protects at least <code>\/wp-admin<\/code> of your site. See the <a href=\"https:\/\/developers.cloudflare.com\/cloudflare-one\/applications\/configure-apps\/self-hosted-apps\/\">Cloudflare documentation<\/a>.<\/li>\n<li>Install and activate the plugin.<\/li>\n<li>Go to <strong>Settings \u2192 Auto Login for Cloudflare Access<\/strong> and enter:\n\n<ul>\n<li><strong>Auth domain<\/strong>: your team domain, for example <code>yourteam.cloudflareaccess.com<\/code>.<\/li>\n<li><strong>Application audience (AUD) tag<\/strong>: found in the Access application's overview.<\/li>\n<\/ul><\/li>\n<li>Optionally enable <strong>Redirect login page<\/strong> so <code>wp-login.php<\/code> sends users through Cloudflare Access.<\/li>\n<\/ol>\n\n<p>Instead of using the settings page you can define the values in <code>wp-config.php<\/code>. Defined values take precedence and cannot be changed from the admin:<\/p>\n\n<pre><code>define('WP_CF_ACCESS_AUTH_DOMAIN', 'yourteam.cloudflareaccess.com');\ndefine('WP_CF_ACCESS_JWT_AUD', 'your-aud-tag');\ndefine('WP_CF_ACCESS_REDIRECT_LOGIN', true);\ndefine('WP_CF_ACCESS_DEBUG_MODE', false);\n<\/code><\/pre>\n\n<!--section=faq-->\n<dl>\n<dt id=\"a%20user%20is%20not%20logged%20in.%20how%20do%20i%20find%20out%20why%3F\"><h3>A user is not logged in. How do I find out why?<\/h3><\/dt>\n<dd><p>Enable debug mode on the settings page and reload a protected page. Every step of the validation is shown in the debug log. Authentication failures are also written to the PHP error log.<\/p><\/dd>\n<dt id=\"how%20do%20i%20send%20the%20wordpress%20login%20page%20to%20cloudflare%20access%3F\"><h3>How do I send the WordPress login page to Cloudflare Access?<\/h3><\/dt>\n<dd><p>Enable <strong>Redirect login page<\/strong>. Visitors to <code>wp-login.php<\/code> are redirected to <code>\/wp-admin\/<\/code>, where Cloudflare Access asks them to sign in. Make sure your Access application protects <code>\/wp-admin<\/code>, otherwise this causes a redirect loop.<\/p><\/dd>\n<dt id=\"is%20my%20server%20still%20reachable%20without%20cloudflare%3F\"><h3>Is my server still reachable without Cloudflare?<\/h3><\/dt>\n<dd><p>That depends on your hosting. Tokens are always verified, but for the best protection only allow traffic to your server from Cloudflare, for example with Cloudflare Tunnel or a firewall allowlist.<\/p><\/dd>\n<dt id=\"does%20the%20plugin%20create%20wordpress%20users%3F\"><h3>Does the plugin create WordPress users?<\/h3><\/dt>\n<dd><p>No. The email address from Cloudflare Access must match an existing user.<\/p><\/dd>\n<dt id=\"what%20data%20does%20the%20debug%20log%20store%3F\"><h3>What data does the debug log store?<\/h3><\/dt>\n<dd><p>Up to 100 recent messages, including email addresses, user names and IP addresses, for at most one week. Clear it with the <strong>Clear Debug Logs<\/strong> button. Everything is removed when the plugin is deleted.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Maintenance: new plugin icon and automated release process. No functional changes.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release in the WordPress.org directory, continuing \"Auto Login with Cloudflare\" by Kan-Ru Chen.<\/li>\n<li>Settings of the original plugin are copied over on activation.<\/li>\n<li>Strict Cloudflare Access token validation with firebase\/php-jwt 7.2.2: RS256 signature, required expiry, audience, issuer and email.<\/li>\n<li>Automatic handling of Cloudflare signing key rotation and outages.<\/li>\n<li>Validated settings, debug log on the settings page, and full cleanup when the plugin is deleted.<\/li>\n<\/ul>","raw_excerpt":"Single sign-on for WordPress behind Cloudflare Access: users who passed Access are logged in automatically by email address.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/411598","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=411598"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/johanneswk"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=411598"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=411598"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=411598"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=411598"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=411598"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=411598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}