get-auth-url
Generate the authentication URL for EVE Online SSO using the OAuth2 flow. Provide the state parameter to initiate secure authorization for accessing EVE Online market data.
Instructions
Get the authentication URL for EVE Online SSO
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes | State parameter for OAuth2 flow |
Implementation Reference
- src/index.ts:479-489 (handler)Handler function for the 'get-auth-url' tool. It takes a state parameter, calls generateAuthUrl to create the SSO authorization URL, and returns it as text content.async ({ state }) => { const authUrl = generateAuthUrl(state); return { content: [ { type: "text", text: authUrl } ] }; }
- src/index.ts:476-478 (schema)Zod input schema for the tool, defining the required 'state' string parameter.{ state: z.string().describe("State parameter for OAuth2 flow") },
- src/index.ts:473-490 (registration)Registration of the 'get-auth-url' tool using server.tool(), including name, description, schema, and handler.server.tool( "get-auth-url", "Get the authentication URL for EVE Online SSO", { state: z.string().describe("State parameter for OAuth2 flow") }, async ({ state }) => { const authUrl = generateAuthUrl(state); return { content: [ { type: "text", text: authUrl } ] }; } );
- src/index.ts:109-124 (helper)Helper function that generates the EVE Online SSO authorization URL using client config and provided state.function generateAuthUrl(state: string): string { const scopes = [ "esi-markets.structure_markets.v1", "esi-markets.read_character_orders.v1" ].join(" "); const params = new URLSearchParams({ response_type: "code", redirect_uri: EVE_CALLBACK_URL, client_id: EVE_CLIENT_ID, scope: scopes, state: state }); return `https://login.eveonline.com/v2/oauth/authorize?${params.toString()}`; }