ziqx_auth_sdk
Installation
SKILL.md
Ziqx Auth SDK Skill
This skill provides comprehensive instructions for using the @ziqx/auth SDK in JavaScript/TypeScript applications, with specific focus on Next.js integration using Server Actions.
Library Architecture
The SDK consists of two primary classes:
ZAuthClient: Handles user-facing interactions like login redirection. It useswindow.location.hrefand is Client-Only.ZAuthTokenService: Handles back-end operations like token exchange and validation. It usesfetchand is Server-Compatible (though it can also be used on the client if necessary).
Environment Compatibility
| Method | Component Type | Environment | Description |
|---|---|---|---|
ZAuthClient.login |
Client Component | Browser | Redirects to Ziqx Auth gateway. |
ZAuthTokenService.validate |
Server/Client | Node/Browser | Validates a JWT/Token. |
ZAuthTokenService.getAuthToken |
Server/Client | Node/Browser | Exchanges an auth code for a token. |
Related skills