DEV Community

Cover image for AI Agents Authentication: How to secure agentic Logins
vdelitz for Corbado

Posted on • Originally published at corbado.com

AI Agents Authentication: How to secure agentic Logins

Read the full article here.


Understanding AI Agents and Passkeys in Modern Security

AI agents—autonomous software systems capable of sensing, planning, and acting—are rapidly changing how digital tasks are performed. As these agents interact with protected APIs and sensitive data, robust authentication and authorization become critical. Passkeys, leveraging cryptographic key pairs instead of passwords, have emerged as a leading solution for secure, phishing-resistant authentication in this landscape.


Passkey Security: User Gestures and Human Presence

Passkeys require a user gesture—such as biometric verification or a PIN—to confirm presence and consent. This design makes them highly resistant to phishing attacks, a crucial advantage in a world where AI-driven deception is evolving quickly. However, this reliance on human action means passkeys cannot be used directly by AI agents, since software processes lack the means to perform human gestures or presence checks.


Secure Delegation: OAuth 2.1 and Scoped Authorization

To bridge this gap, passkeys are used as a foundation for secure delegation. Humans authenticate with passkeys and then authorize AI agents via OAuth 2.1. This framework issues scoped, temporary tokens, giving agents permission to operate on the user’s behalf—without exposing the passkey or requiring the agent to mimic a human gesture. Integrating OAuth Authorization Code Flow with Proof Key for Code Exchange (PKCE) ensures that both authentication and consent are phishing-resistant and explicit.


Practical Example: GitHub, Passkeys and Agent Automation

A real-world case is GitHub's login system: users authenticate with passkeys, then delegate limited access to agents (such as CI/CD bots) through OAuth tokens. This model provides secure, auditable, and revocable automation—demonstrating how passkeys and OAuth can work together for agentic logins.


Agent-to-Agent Authentication and Security Challenges

Complex scenarios may involve agent-to-agent authentication, where token exchange brokers manage least-privilege access and traceability across multiple systems. Addressing token abuse and prompt injection attacks requires enforcing short-lived tokens, clear scoping, and, for sensitive operations, step-up authentication—prompting a fresh passkey verification to ensure human consent.


Digital Verifiable Credentials and Human Anchoring

Digital verifiable credentials—cryptographically signed proofs of identity or claims—also require a human in the loop for security ceremonies. As with passkeys, AI agents cannot present these credentials directly; instead, delegated authorization allows them to act on verified claims without compromising the underlying credential.


Future Directions: Standardized Protocols and Enterprise Adoption

Industry standards bodies like the W3C AI Agent Protocol Community Group and IETF are developing new protocols for agent identity, secure delegation, and cryptographic interoperability. As these standards mature, enterprises can leverage platforms like Corbado to streamline passkey adoption, accelerate user onboarding, and maintain robust compliance for AI-powered automation.


Conclusion: Passkeys enable secure AI Agent Delegation

Passkeys and AI agents form a secure partnership: passkeys authenticate humans, who then delegate precise, revocable authority to agents using OAuth and other frameworks. This approach provides the foundation for safe, automated workflows in enterprise environments—and paves the way for a future where AI agents operate securely and efficiently under strict user control.

Find out more on our detailed blog post.

Top comments (0)