accounts-express demo

Status: unknown

Endpoints

Each button calls one server endpoint. The server demonstrates a distinct way of using auth.

1. Required auth

GET /api/me

createAuthMiddleware({ required: true }). Returns 401 without a token.

2. Optional auth

GET /api/feed

createAuthMiddleware({ required: false }). Always 200; personalized when logged in.

3. Context-token forwarding

GET /api/proxy/me

Inside the handler, the server calls aeFetch(url); the wrapper picks up the current request's loginToken and attaches it.

4. Explicit token

GET /api/proxy/explicit

Server mints a fresh token for the caller and uses Meteor.fetch(url, { token }) for the inner request.

5. Neutral fetch

GET /api/proxy/raw

Server calls Meteor.fetch(url) with no options. No token, no credentials, no context.

Last response

Click any button above to see a response.