ci4-shield

Implement CodeIgniter 4 authentication and authorization with the Shield library.

21|7|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/enlivenapp/Codeigniter4-App-and-API-Skills-for-Claude-Code --skill ci4-shield
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ci4-shield
Source: https://github.com/enlivenapp/Codeigniter4-App-and-API-Skills-for-Claude-Code/tree/main/ci4-shield
Command: npx skills add https://github.com/enlivenapp/Codeigniter4-App-and-API-Skills-for-Claude-Code --skill ci4-shield

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates the need to manually build and debug authentication and authorization systems for CodeIgniter 4 applications, reducing development time and avoiding common security misconfigurations when using the official Shield library.

Core Features & Use Cases

  • Comprehensive auth support: Covers session login, Bearer access tokens, HMAC tokens, JWT, email activation, two-factor authentication, magic links, and user banning.
  • Fine-grained access control: Built-in group management, permission matrices, and direct user permission overrides for role-based and attribute-based access control.
  • Use Case: For example, use this Skill to quickly add passwordless magic link login to a CI4 e-commerce site, or set up token-based API auth for a mobile app connected to a CI4 backend.

Quick Start

Use the ci4-shield skill to implement session-based login with email activation and group-protected admin routes for your CodeIgniter 4 application.

Frequently Asked Questions about ci4-shield

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up CodeIgniter 4 authentication and access control?

CodeIgniter 4 authentication and access control is implemented using the official Shield library, which handles session logins, API tokens, and role-based permissions. It manages configuration, route filter setup, and user group management.

Can I use CodeIgniter Shield for REST API token authentication?

Yes, CodeIgniter Shield supports REST API token authentication using Bearer access tokens, HMAC tokens, and JWT. This enables secure mobile app connectivity and stateless API access for your CI4 backend.

What is the best way to implement role-based access control in CodeIgniter 4?

Role-based access control in CodeIgniter 4 is best implemented using Shield's group management, permission matrices, and direct user permission overrides. This provides fine-grained authority for protected routes and specific user attributes.

Does CodeIgniter 4 Shield support passwordless magic link login?

Yes, CodeIgniter 4 Shield supports passwordless magic link login alongside email activation and two-factor authentication. This enables secure, convenient access for e-commerce sites without requiring users to type passwords.

How do I handle user banning and email verification in a CI4 application?

User banning and email verification in a CI4 application are handled natively by the Shield library. It provides built-in workflows for email activation and restricting banned users from accessing the system.

Do I need to manually build custom auth views and controllers for CodeIgniter Shield?

No, you do not need to manually build custom auth views and controllers from scratch for CodeIgniter Shield. The library supports custom extensions, allowing you to override existing authentication views and controllers directly.