@ianlucas/remix-auth-steam 8.0.0 → 8.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,17 @@
1
+ import { Strategy } from "remix-auth/strategy";
2
+ declare namespace SteamStrategy {
3
+ interface Options {
4
+ returnURL: string;
5
+ }
6
+ type VerifyOptions = {
7
+ request: Request;
8
+ userID: string;
9
+ };
10
+ }
11
+ export declare class SteamStrategy<User> extends Strategy<User, SteamStrategy.VerifyOptions> {
12
+ private options;
13
+ name: string;
14
+ constructor(options: SteamStrategy.Options | ((request: Request) => Promise<SteamStrategy.Options>), verify: Strategy.VerifyFunction<User, SteamStrategy.VerifyOptions>);
15
+ authenticate(request: Request): Promise<User>;
16
+ }
17
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,30 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Ian Lucas. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ import { redirect } from "react-router";
6
+ import { Strategy } from "remix-auth/strategy";
7
+ import { SteamOpenID } from "./openid.js";
8
+ export class SteamStrategy extends Strategy {
9
+ options;
10
+ name = "steam";
11
+ constructor(options, verify) {
12
+ super(verify);
13
+ this.options = options;
14
+ }
15
+ async authenticate(request) {
16
+ const { returnURL } = typeof this.options === "function" ? await this.options(request) : this.options;
17
+ const steamOpenID = new SteamOpenID(returnURL, request);
18
+ if (steamOpenID.shouldValidate()) {
19
+ const userID = await steamOpenID.validate();
20
+ return await this.verify({
21
+ userID,
22
+ request
23
+ });
24
+ }
25
+ else {
26
+ throw redirect(steamOpenID.getAuthUrl());
27
+ }
28
+ }
29
+ }
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAa1C,MAAM,OAAO,aAAoB,SAAQ,QAA2C;IAIpE;IAHZ,IAAI,GAAG,OAAO,CAAC;IAEf,YACY,OAAuF,EAC/F,MAAkE;QAElE,KAAK,CAAC,MAAM,CAAC,CAAC;QAHN,YAAO,GAAP,OAAO,CAAgF;IAInG,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,OAAgB;QAC/B,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,IAAI,CAAC,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;QACtG,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACxD,IAAI,WAAW,CAAC,cAAc,EAAE,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,QAAQ,EAAE,CAAC;YAC5C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC;gBACrB,MAAM;gBACN,OAAO;aACV,CAAC,CAAC;QACP,CAAC;aAAM,CAAC;YACJ,MAAM,QAAQ,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC;QAC7C,CAAC;IACL,CAAC;CACJ"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * A correct and simple implementation of OpenID authentication for Steam.
3
+ * @see https://github.com/xPaw/SteamOpenID.php
4
+ */
5
+ export declare class SteamOpenID {
6
+ private static readonly SERVER;
7
+ private static readonly OPENID_NS;
8
+ private static readonly EXPECTED_SIGNED;
9
+ private static readonly STEAM_ID_REGEX;
10
+ /**
11
+ * The URL to which Steam will redirect the user after authentication.
12
+ * This is also used to validate the "openid.return_to" parameter.
13
+ */
14
+ readonly returnUrl: string;
15
+ /**
16
+ * The search parameters from the incoming request URL.
17
+ */
18
+ private readonly params;
19
+ /**
20
+ * Creates an instance of the SteamOpenID authenticator.
21
+ * @param returnUrl The URL to which Steam should return. Must match the "openid.return_to" parameter on callback.
22
+ * @param request The incoming web request object.
23
+ */
24
+ constructor(returnUrl: string, request: Request);
25
+ /**
26
+ * Returns `true` if the request URL contains the necessary parameters to be validated.
27
+ * This indicates the user has been redirected back from Steam.
28
+ */
29
+ shouldValidate(): boolean;
30
+ /**
31
+ * Gets the Steam authentication URL to redirect the user to.
32
+ * @returns The authentication URL.
33
+ */
34
+ getAuthUrl(): string;
35
+ /**
36
+ * Validates the authentication request from Steam.
37
+ * @returns A `Promise` that resolves with the user's 64-bit SteamID.
38
+ * @throws An `Error` if validation fails at any step.
39
+ */
40
+ validate(): Promise<string>;
41
+ /**
42
+ * Sends the verification request to the Steam server.
43
+ * Can be overridden for custom request logic (e.g., using a proxy).
44
+ * @param params The parameters to send in the POST body.
45
+ * @returns The response body as a string.
46
+ */
47
+ protected sendVerificationRequest(params: URLSearchParams): Promise<string>;
48
+ /**
49
+ * Retrieves required OpenID arguments from the request's query parameters
50
+ * and performs initial validation.
51
+ */
52
+ private getAndValidateArguments;
53
+ /**
54
+ * Parses a Key-Value response string from Steam.
55
+ */
56
+ private static parseKeyValues;
57
+ }
package/dist/openid.js ADDED
@@ -0,0 +1,182 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Ian Lucas. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /**
6
+ * A correct and simple implementation of OpenID authentication for Steam.
7
+ * @see https://github.com/xPaw/SteamOpenID.php
8
+ */
9
+ export class SteamOpenID {
10
+ static SERVER = "https://steamcommunity.com/openid/login";
11
+ static OPENID_NS = "http://specs.openid.net/auth/2.0";
12
+ static EXPECTED_SIGNED = "signed,op_endpoint,claimed_id,identity,return_to,response_nonce,assoc_handle";
13
+ static STEAM_ID_REGEX = /^https:\/\/steamcommunity\.com\/openid\/id\/(76561[0-9]{12})\/?$/;
14
+ /**
15
+ * The URL to which Steam will redirect the user after authentication.
16
+ * This is also used to validate the "openid.return_to" parameter.
17
+ */
18
+ returnUrl;
19
+ /**
20
+ * The search parameters from the incoming request URL.
21
+ */
22
+ params;
23
+ /**
24
+ * Creates an instance of the SteamOpenID authenticator.
25
+ * @param returnUrl The URL to which Steam should return. Must match the "openid.return_to" parameter on callback.
26
+ * @param request The incoming web request object.
27
+ */
28
+ constructor(returnUrl, request) {
29
+ const parsed = new URL(returnUrl);
30
+ if (parsed.protocol !== "https:" && parsed.protocol !== "http:") {
31
+ throw new Error("ReturnURL must start with https:// or http://");
32
+ }
33
+ if (!parsed.hostname) {
34
+ throw new Error("ReturnURL must contain a host.");
35
+ }
36
+ if (!parsed.pathname || parsed.pathname === "/") {
37
+ throw new Error("ReturnURL must contain a path to prevent prefix attacks.");
38
+ }
39
+ this.returnUrl = returnUrl;
40
+ this.params = new URL(request.url).searchParams;
41
+ }
42
+ /**
43
+ * Returns `true` if the request URL contains the necessary parameters to be validated.
44
+ * This indicates the user has been redirected back from Steam.
45
+ */
46
+ shouldValidate() {
47
+ return this.params.get("openid.mode") === "id_res";
48
+ }
49
+ /**
50
+ * Gets the Steam authentication URL to redirect the user to.
51
+ * @returns The authentication URL.
52
+ */
53
+ getAuthUrl() {
54
+ const params = new URLSearchParams({
55
+ "openid.ns": SteamOpenID.OPENID_NS,
56
+ "openid.mode": "checkid_setup",
57
+ "openid.return_to": this.returnUrl,
58
+ "openid.identity": "http://specs.openid.net/auth/2.0/identifier_select",
59
+ "openid.claimed_id": "http://specs.openid.net/auth/2.0/identifier_select"
60
+ });
61
+ return `${SteamOpenID.SERVER}?${params.toString()}`;
62
+ }
63
+ /**
64
+ * Validates the authentication request from Steam.
65
+ * @returns A `Promise` that resolves with the user's 64-bit SteamID.
66
+ * @throws An `Error` if validation fails at any step.
67
+ */
68
+ async validate() {
69
+ const args = this.getAndValidateArguments();
70
+ // Verify that the request came from the Steam endpoint and matches our parameters
71
+ if (args["openid.op_endpoint"] !== SteamOpenID.SERVER) {
72
+ throw new Error('Invalid "openid.op_endpoint".');
73
+ }
74
+ if (!args["openid.return_to"]?.startsWith(this.returnUrl)) {
75
+ throw new Error('Invalid "openid.return_to".');
76
+ }
77
+ // Validate response_nonce format and timestamp
78
+ // RFC3339 YYYY-MM-DDTHH:MM:SSZ followed by unique characters
79
+ const nonceMatch = args["openid.response_nonce"]?.match(/^([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z)/);
80
+ if (!nonceMatch || !nonceMatch[1]) {
81
+ throw new Error('Invalid "openid.response_nonce" format.');
82
+ }
83
+ const nonceTime = new Date(nonceMatch[1]).getTime();
84
+ if (isNaN(nonceTime) || Math.abs(Date.now() - nonceTime) > 300_000) {
85
+ throw new Error("Nonce timestamp is too old or invalid.");
86
+ }
87
+ // Extract SteamID from the identity URL
88
+ const match = args["openid.identity"]?.match(SteamOpenID.STEAM_ID_REGEX);
89
+ if (!match || !match[1]) {
90
+ throw new Error('Invalid "openid.identity".');
91
+ }
92
+ const steamId = match[1];
93
+ // Prepare parameters for server-side verification
94
+ const verificationParams = new URLSearchParams(args);
95
+ verificationParams.set("openid.mode", "check_authentication");
96
+ // Make the verification request to Steam
97
+ const response = await this.sendVerificationRequest(verificationParams);
98
+ // Parse Steam's key-value response
99
+ const keyValues = SteamOpenID.parseKeyValues(response);
100
+ // Check if Steam confirmed the validation
101
+ if (keyValues["is_valid"] !== "true" || keyValues["ns"] !== SteamOpenID.OPENID_NS) {
102
+ throw new Error("Failed to validate login with Steam: Invalid response.");
103
+ }
104
+ return steamId;
105
+ }
106
+ /**
107
+ * Sends the verification request to the Steam server.
108
+ * Can be overridden for custom request logic (e.g., using a proxy).
109
+ * @param params The parameters to send in the POST body.
110
+ * @returns The response body as a string.
111
+ */
112
+ async sendVerificationRequest(params) {
113
+ const response = await fetch(SteamOpenID.SERVER, {
114
+ method: "POST",
115
+ headers: {
116
+ "Content-Type": "application/x-www-form-urlencoded",
117
+ "User-Agent": "TypeScript-SteamOpenID/1.0.0"
118
+ },
119
+ body: params
120
+ });
121
+ if (!response.ok) {
122
+ if (response.status === 403 || response.status === 429) {
123
+ throw new Error("Steam OpenID endpoint is rate-limited. Please try again later.");
124
+ }
125
+ throw new Error(`Steam verification request failed with HTTP ${response.status}.`);
126
+ }
127
+ return response.text();
128
+ }
129
+ /**
130
+ * Retrieves required OpenID arguments from the request's query parameters
131
+ * and performs initial validation.
132
+ */
133
+ getAndValidateArguments() {
134
+ const args = {};
135
+ const signedKeys = SteamOpenID.EXPECTED_SIGNED.split(",");
136
+ for (const key of signedKeys) {
137
+ // The 'openid.' prefix is implicit for keys in EXPECTED_SIGNED
138
+ const openIdKey = `openid.${key}`;
139
+ const value = this.params.get(openIdKey);
140
+ if (!value) {
141
+ throw new Error(`Missing required OpenID parameter: "${openIdKey}".`);
142
+ }
143
+ args[openIdKey] = value;
144
+ }
145
+ // Add other required fields not in the 'signed' list
146
+ const otherRequiredKeys = ["openid.mode", "openid.sig", "openid.ns"];
147
+ for (const key of otherRequiredKeys) {
148
+ const value = this.params.get(key);
149
+ if (!value) {
150
+ throw new Error(`Missing required OpenID parameter: "${key}".`);
151
+ }
152
+ args[key] = value;
153
+ }
154
+ if (args["openid.mode"] !== "id_res") {
155
+ throw new Error('Invalid "openid.mode". Expected "id_res".');
156
+ }
157
+ if (args["openid.ns"] !== SteamOpenID.OPENID_NS) {
158
+ throw new Error('Invalid "openid.ns".');
159
+ }
160
+ if (args["openid.signed"] !== SteamOpenID.EXPECTED_SIGNED) {
161
+ throw new Error('Invalid "openid.signed" field.');
162
+ }
163
+ return args;
164
+ }
165
+ /**
166
+ * Parses a Key-Value response string from Steam.
167
+ */
168
+ static parseKeyValues(response) {
169
+ const data = {};
170
+ const lines = response.trim().split("\n");
171
+ for (const line of lines) {
172
+ const separatorIndex = line.indexOf(":");
173
+ if (separatorIndex !== -1) {
174
+ const key = line.substring(0, separatorIndex);
175
+ const value = line.substring(separatorIndex + 1);
176
+ data[key] = value;
177
+ }
178
+ }
179
+ return data;
180
+ }
181
+ }
182
+ //# sourceMappingURL=openid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openid.js","sourceRoot":"","sources":["../src/openid.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;;GAGG;AACH,MAAM,OAAO,WAAW;IACZ,MAAM,CAAU,MAAM,GAAG,yCAAyC,CAAC;IACnE,MAAM,CAAU,SAAS,GAAG,kCAAkC,CAAC;IAC/D,MAAM,CAAU,eAAe,GACnC,8EAA8E,CAAC;IAC3E,MAAM,CAAU,cAAc,GAAG,kEAAkE,CAAC;IAE5G;;;OAGG;IACa,SAAS,CAAS;IAElC;;OAEG;IACc,MAAM,CAAkB;IAEzC;;;;OAIG;IACH,YAAY,SAAiB,EAAE,OAAgB;QAC3C,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;QAClC,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;YAC9D,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;QACrE,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACtD,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,KAAK,GAAG,EAAE,CAAC;YAC9C,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;QAChF,CAAC;QACD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,YAAY,CAAC;IACpD,CAAC;IAED;;;OAGG;IACI,cAAc;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,CAAC,GAAG,KAAK,CAAC;QACtB,CAAC;QAED,IAAI,IAAI,CAAC,aAAa,CAAC,KAAK,QAAQ,EAAE,CAAC;YACnC,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;QACjE,CAAC;QACD,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,WAAW,CAAC,SAAS,EAAE,CAAC;YAC9C,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC5C,CAAC;QACD,IAAI,IAAI,CAAC,eAAe,CAAC,KAAK,WAAW,CAAC,eAAe,EAAE,CAAC;YACxD,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACtD,CAAC;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;OAEG;IACK,MAAM,CAAC,cAAc,CAAC,QAAgB;QAC1C,MAAM,IAAI,GAA2B,EAAE,CAAC;QACxC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC1C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACvB,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACzC,IAAI,cAAc,KAAK,CAAC,CAAC,EAAE,CAAC;gBACxB,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;gBAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC;gBACjD,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YACtB,CAAC;QACL,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC"}
package/package.json CHANGED
@@ -23,6 +23,9 @@
23
23
  "type": "module",
24
24
  "main": "./dist/index.js",
25
25
  "types": "./dist/index.d.ts",
26
+ "files": [
27
+ "dist"
28
+ ],
26
29
  "sideEffects": false,
27
30
  "scripts": {
28
31
  "docs": "typedoc --out docs src/index.ts",
@@ -45,5 +48,5 @@
45
48
  "engines": {
46
49
  "node": ">=20"
47
50
  },
48
- "version": "8.0.0"
51
+ "version": "8.0.1"
49
52
  }