Documentation
¶
Overview ¶
Example: standalone AuthSome server with memory store and password + social plugins.
Run:
go run ./_examples/standalone/
Then interact with the API:
# Health check
curl http://localhost:8080/v1/auth/health
# Sign up
curl -X POST http://localhost:8080/v1/auth/signup \
-H 'Content-Type: application/json' \
-d '{"email":"user@example.com","password":"SecureP@ss123","name":"Alice"}'
# Sign in
curl -X POST http://localhost:8080/v1/auth/signin \
-H 'Content-Type: application/json' \
-d '{"email":"user@example.com","password":"SecureP@ss123"}'
# Get current user (use session_token from sign-in response)
curl http://localhost:8080/v1/auth/me \
-H 'Authorization: Bearer <session_token>'
# OpenAPI spec
curl http://localhost:8080/.well-known/authsome/openapi
Click to show internal directories.
Click to hide internal directories.