Add auth infrastructure to your Windsurf workflow. 30 seconds.
Add to your project's .env file:
AUTHSHORE_BASE_URL=https://authshore.ai AUTHSHORE_API_KEY=as_pub_your_key_here
curl -X POST ${AUTHSHORE_BASE_URL}/api/v1/auth/signup \
-H "X-API-Key: ${AUTHSHORE_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"email":"alice@example.com","password":"SecureP@ss123","name":"Alice"}'
# Response: {"userId":"usr_...","status":"confirmed"}
Create or update .windsurfrules in your project root. Windsurf reads this file for project context:
## AuthShore Integration
Base URL: ${AUTHSHORE_BASE_URL}
Auth: X-API-Key: ${AUTHSHORE_API_KEY}
### User Pools (Cognito-compatible)
POST /api/v1/sdk/cognito/pools — Create pool
POST /api/v1/sdk/cognito/pools/:id/users — Add user
POST /api/v1/sdk/cognito/pools/:id/auth/signup — Signup in pool
POST /api/v1/sdk/cognito/pools/:id/auth/signin — Signin in pool
### Secrets Vault
POST /api/v1/sdk/secrets — Store secret
GET /api/v1/sdk/secrets/:id — Read secret (decrypted)
GET /api/v1/sdk/secrets — List secrets
### Tokens
POST /api/v1/tokens/validate — Validate JWT
POST /api/v1/tokens/refresh — Refresh token
POST /api/v1/tokens/revoke — Revoke token
### Auth
POST /api/v1/auth/signup — Create user
POST /api/v1/auth/signin — Sign in
POST /api/v1/auth/forgot-password — Reset flow
curl -X POST ${AUTHSHORE_BASE_URL}/api/v1/sdk/cognito \
-H "X-API-Key: ${AUTHSHORE_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"action": "CreateUserPool",
"params": {"PoolName":"my-app-users","Policies":{"PasswordPolicy":{"MinimumLength":8}}}
}'
curl -X POST ${AUTHSHORE_BASE_URL}/api/v1/sdk/secrets \
-H "X-API-Key: ${AUTHSHORE_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"name":"stripe-api-key","value":"sk_live_...","description":"Production Stripe key"}'
# Validate a JWT
curl -X POST ${AUTHSHORE_BASE_URL}/api/v1/tokens/validate \
-H "X-API-Key: ${AUTHSHORE_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"token":"eyJhbGciOi..."}'
# Refresh a token
curl -X POST ${AUTHSHORE_BASE_URL}/api/v1/tokens/refresh \
-H "X-API-Key: ${AUTHSHORE_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"refreshToken":"rt_..."}'
# Revoke a token
curl -X POST ${AUTHSHORE_BASE_URL}/api/v1/tokens/revoke \
-H "X-API-Key: ${AUTHSHORE_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"token":"eyJhbGciOi..."}'