WP Manifestindependent plugin directory
manifest / users / auth-tehran-it

Auth Tehran IT

Professional WordPress Authentication Framework for Developers. Custom Login, Registration, Profile Management, Google OAuth, AJAX Authentication and Tehran IT Captcha Integration.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/ahadian2/auth-tehran-it/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

فارسی / Persian README

A professional WordPress authentication plugin developed by Tehran IT and Mohammadreza Ahadian.

This plugin is built for WordPress developers, agencies, and advanced users who need a custom authentication system inside professional WordPress projects.

It is not designed for normal end-users or one-click usage.


Developer

Mohammadreza Ahadian
Tehran IT

Website:
https://tehranit.net

Plugin URI:
https://tehranit.net/plugins/auth-tehran-it


Important Notice

This plugin is made for developers.

You should use this plugin only if you understand:

  • WordPress plugin development
  • WordPress theme development
  • Shortcodes
  • WordPress hooks and filters
  • AJAX requests
  • User roles and user meta
  • Custom templates
  • Redirect handling
  • Google OAuth setup

This plugin is not a simple membership plugin for normal WordPress users.

It gives developers a flexible authentication structure that can be customized inside a WordPress theme or project.


For maximum security and full functionality, it is strongly recommended to install:

Tehran IT Captcha

This authentication plugin can work with Tehran IT Captcha to protect login, registration, and password recovery forms.

The captcha plugin is used to protect:

  • Login form
  • Registration form
  • Password recovery form
  • AJAX authentication requests

Download link:

Add Tehran IT Captcha download link here

Without Tehran IT Captcha, some security features may not be available.


Features

  • Custom login form
  • Custom registration form
  • Password recovery form
  • Profile edit form
  • Google login
  • AJAX-based authentication
  • Secure logout
  • Custom user menu
  • Header user menu
  • Profile menu
  • Box menu
  • Mobile menu
  • Redirect management
  • wp-login.php blocking
  • Custom user fields
  • User avatar support
  • Easy Digital Downloads compatibility
  • Developer-friendly structure

Installation

1. Upload Plugin

Upload the plugin folder to:

wp-content/plugins/auth-tehran-it

2. Activate Plugin

Go to:

WordPress Dashboard → Plugins

Then activate:

Auth Tehran IT

3. Install Tehran IT Captcha

Install and activate:

Tehran IT Captcha

This is strongly recommended for maximum security.

4. Create Required Pages

Create a login page with this slug:

login

Example URL:

https://example.com/login/

Create a profile page with this slug:

profile

Example URL:

https://example.com/profile/

Shortcodes

Login, Register, and Password Recovery Form

Use this shortcode inside the login page:

[tit_20260516_login_form]

This shortcode handles:

  • Login
  • Registration
  • Forgot password
  • Google login button
  • Captcha integration

Recommended page:

/login/

Profile Edit Form

Use this shortcode inside the profile page:

[tit_20260516_profile_edit]

Recommended page:

/profile/

This shortcode allows logged-in users to edit their profile information.


Template Helper Functions

You can use these functions inside your theme files.

Header User Menu

<?php
if (function_exists('tit_20260516_render_header_menu')) {
    tit_20260516_render_header_menu();
}
?>

This displays the user avatar and dropdown menu in the header.

If the user is not logged in, it displays the login icon.


Profile Sidebar Menu

<?php
if (function_exists('tit_20260516_render_profile_menu')) {
    tit_20260516_render_profile_menu();
}
?>

This displays the profile sidebar menu.


Box Menu

<?php
if (function_exists('tit_20260516_render_box_menu')) {
    tit_20260516_render_box_menu();
}
?>

This displays the user menu in box style.


Mobile Menu

<?php
if (function_exists('tit_20260516_render_mobile_menu')) {
    tit_20260516_render_mobile_menu();
}
?>

This displays the user menu for mobile layouts.


Admin Panel

After activation, the plugin adds a new admin menu:

Tehran IT Auth

Inside this admin area, developers can manage and review:

  • Plugin guide
  • Menu items
  • Google OAuth settings
  • Shortcodes
  • Template functions
  • Developer notes

User Menu Management

Go to:

Tehran IT Auth → Menu Management

From this page, you can:

  • Add profile menu items
  • Edit menu item title
  • Edit menu item URL
  • Edit menu item icon
  • Change menu item order
  • Delete menu items

The logout item is added automatically by the plugin.


Google Login Setup

This plugin supports Google OAuth login.

Google Login Behavior

If the user email already exists in WordPress, the existing user will be logged in.

If the user email does not exist, a new WordPress user will be created.


Redirect URI

Use this redirect URI inside Google Cloud Console:

https://example.com/?tit_20260516_google_callback=1

Replace https://example.com with your own website URL.

For Tehran IT website:

https://tehranit.net/?tit_20260516_google_callback=1

Google Settings

Go to:

Tehran IT Auth → Google Settings

Then add:

Google Client ID
Google Client Secret

Common Google OAuth Errors

redirect_uri_mismatch

The Redirect URI inside Google Console is not the same as the plugin Redirect URI.

invalid_client

The Client ID or Client Secret is wrong.

access token was not received

Usually the Client Secret or Redirect URI is not correct.


Redirect Behavior

The plugin can redirect users based on their login status.

Recommended behavior:

Logged-out user visits /profile/
→ Redirect to /login/

Logged-in user visits /login/
→ Redirect to /profile/

Recommended safe login shortcode condition:

if (is_user_logged_in() && is_page('login')) {
    wp_safe_redirect(home_url('/profile/'));
    exit;
}

This prevents logged-in users from seeing the login page.

It also helps prevent redirect loops because the redirect only runs on the login page.


wp-login.php Blocking

The plugin can block direct access to:

/wp-login.php

Users are redirected to the custom login page:

/login/

Allowed actions such as logout and password recovery can still be handled safely.


Captcha Integration

This plugin can use Tehran IT Captcha automatically if the captcha plugin is installed and active.

The authentication plugin checks for the captcha handler and renders captcha inside the form.

Recommended captcha plugin:

Tehran IT Captcha

Download link:

Add Tehran IT Captcha download link here

User Meta Fields

The plugin stores custom user information using prefixed meta keys.

Examples:

tit_20260516_mobile
tit_20260516_gender
tit_20260516_google_id
tit_20260516_google_picture

Easy Digital Downloads Compatibility

When a user registers with Google, the email is already verified by Google.

For this reason, the plugin can remove the EDD pending verification meta:

_edd_pending_verification

This helps Google users access their account without being blocked by EDD email verification.


Naming Convention

This plugin uses a unique prefix to avoid conflicts with other plugins and themes.

Classes and constants:

TIT_20260516_

Functions, options, AJAX actions, nonces, and user meta:

tit_20260516_

Do not remove or change this prefix unless you know exactly what you are doing.


AJAX Actions

The plugin uses AJAX actions with this prefix:

tit_20260516_

Examples:

tit_20260516_login
tit_20260516_register
tit_20260516_forgot
tit_20260516_update_profile

Security Notes

The plugin uses:

  • Nonce validation
  • Input sanitization
  • Output escaping
  • Safe redirects
  • AJAX security checks
  • Custom logout nonce
  • Captcha integration

Developers should still test all authentication flows before production use.


Before Production

Before uploading to a live website, test:

  • Login
  • Registration
  • Forgot password
  • Google login
  • Logout
  • Profile edit
  • Header menu
  • Profile menu
  • Mobile menu
  • Redirects
  • wp-login.php blocking
  • Captcha validation

Git Notes

Do not upload local editor or Visual Studio files to Git.

Recommended .gitignore:

.vs/
.idea/
.vscode/
*.suo
*.user
*.userosscache
*.sln.docstates
.DS_Store
Thumbs.db

Requirements

WordPress:

5.0+

PHP:

7.4+

Recommended PHP:

8.0+

License

GPL v2 or later


© Tehran IT – Mohammadreza Ahadian
All rights reserved.