@ianlucas/remix-auth-steam 2.1.0 → 3.0.0

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.
package/dist/index.d.ts CHANGED
@@ -6,10 +6,13 @@ export interface SteamStrategyOptions {
6
6
  realm?: string;
7
7
  apiKey: string;
8
8
  }
9
- export type SteamStrategyVerifyParams = UserSummary;
9
+ export type SteamStrategyVerifyParams = {
10
+ request: Request;
11
+ user: UserSummary;
12
+ };
10
13
  export declare class SteamStrategy<User> extends Strategy<User, SteamStrategyVerifyParams> {
11
- name: string;
12
14
  private options;
13
- constructor(options: SteamStrategyOptions | (() => Promise<SteamStrategyOptions>), verify: StrategyVerifyCallback<User, SteamStrategyVerifyParams>);
15
+ name: string;
16
+ constructor(options: SteamStrategyOptions | ((request: Request) => Promise<SteamStrategyOptions>), verify: StrategyVerifyCallback<User, SteamStrategyVerifyParams>);
14
17
  authenticate(request: Request, sessionStorage: SessionStorage, options: AuthenticateOptions): Promise<User>;
15
18
  }
package/dist/index.js CHANGED
@@ -33,8 +33,8 @@ function verifySteamAssertion(relyingParty, request) {
33
33
  });
34
34
  }
35
35
  export class SteamStrategy extends Strategy {
36
- name = "steam";
37
36
  options;
37
+ name = "steam";
38
38
  constructor(options, verify) {
39
39
  super(verify);
40
40
  this.options = options;
@@ -50,7 +50,7 @@ export class SteamStrategy extends Strategy {
50
50
  try {
51
51
  const userSteamID = result.claimedIdentifier.toString().split("/").at(-1);
52
52
  const steamUserSummary = (await steamApi.getUserSummary(userSteamID));
53
- const user = await this.verify(steamUserSummary);
53
+ const user = await this.verify({ user: steamUserSummary, request });
54
54
  return this.success(user, request, sessionStorage, options);
55
55
  }
56
56
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ianlucas/remix-auth-steam",
3
- "version": "2.1.0",
3
+ "version": "3.0.0",
4
4
  "description": "Remix authentication strategy for Steam",
5
5
  "license": "MIT",
6
6
  "author": "Ian Lucas",