pi-auth

Authenticate Pi Network users by validating tokens against api.minepi.com.

4|Updated Dec 5, 2025
One-click install
npx skills add https://github.com/aaaa47080/stock_agent --skill pi-auth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pi-auth
Source: https://github.com/aaaa47080/stock_agent/tree/main/.agent/skills/pi-auth
Command: npx skills add https://github.com/aaaa47080/stock_agent --skill pi-auth

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pi Apps need a secure, standardized authentication flow that doesn't rely on passwords or third-party login providers, ensuring identity verification and safe session management for Pioneer users.

Core Features & Use Cases

  • SDK-based authentication: Initialize the Pi SDK on the frontend, request appropriate scopes, and obtain a dynamic accessToken along with user data for session creation.
  • Server-side verification: Validate the accessToken with the Pi Platform API (GET /v2/me) to bind the proven uid to backend records.
  • Security-first practices: Enforce server-side verification, never persist accessToken or uid on the client, and apply proper scopes to protect user identities.

Quick Start

Initialize the Pi SDK on the client, call Pi.authenticate with the required scopes, and handle the resulting auth object to establish a user session.

Frequently Asked Questions about pi-auth

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

FAQPage Schema
How do I authenticate Pi Network users in my app?

You verify a Pi Network accessToken by sending a server-side GET request to the api.minepi.com/v2/me endpoint. This backend validation proves the token's authenticity and securely binds the user's uid to your application records.

Can I persist the Pi accessToken and uid on the client side?

No, you must never persist the accessToken or uid on the client side. Enforcing strict server-side verification and on-device token management prevents unauthorized access and protects user identities across Pi-powered apps.

Do I need server-side verification for Pi SDK login flows?

Yes, server-side verification is mandatory for Pi SDK login flows. Validating the accessToken against the Pi Platform API binds the proven user identity to backend records, ensuring your application's session management remains secure against spoofing.

What is the best way to manage secure identity for Pioneer users?

The best way to manage secure identity for Pioneer users is a security-first approach using the Pi SDK. Initialize the SDK, request proper scopes, and apply strict server-side token verification to eliminate third-party providers and ensure safe sessions.