Skip to content

Commit

Permalink
fix(deps): update remix-auth packages (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
JosteinKringlen committed Dec 29, 2022
1 parent 3843f9e commit 54f0d1d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 21 deletions.
41 changes: 22 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
"vitest": "0.26.2"
},
"dependencies": {
"remix-auth": "3.2.2",
"remix-auth-oauth2": "1.2.2"
"remix-auth": "3.4.0",
"remix-auth-oauth2": "1.5.0"
},
"config": {
"commitizen": {
Expand Down
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface SpotifyStrategyOptions {
scope?: string;
sessionStorage: SessionStorage;
sessionKey?: string;
sessionStrategyKey?: string;
sessionErrorKey?: string;
}

Expand Down Expand Up @@ -93,6 +94,7 @@ export class SpotifyStrategy extends OAuth2Strategy<
private readonly userInfoURL = 'https://api.spotify.com/v1/me';
private readonly sessionStorage: SessionStorage;
readonly sessionKey: string;
readonly sessionStrategyKey: string;
readonly sessionErrorKey: string;

constructor(
Expand All @@ -103,6 +105,7 @@ export class SpotifyStrategy extends OAuth2Strategy<
scope,
sessionStorage,
sessionKey,
sessionStrategyKey,
sessionErrorKey,
}: SpotifyStrategyOptions,
verify: StrategyVerifyCallback<
Expand All @@ -123,6 +126,7 @@ export class SpotifyStrategy extends OAuth2Strategy<
this.scope = scope ?? 'user-read-email';
this.sessionStorage = sessionStorage;
this.sessionKey = sessionKey ?? 'spotify:session';
this.sessionStrategyKey = sessionStrategyKey ?? 'spotify';
this.sessionErrorKey = sessionErrorKey ?? 'spotify:error';
}

Expand Down Expand Up @@ -265,7 +269,9 @@ export class SpotifyStrategy extends OAuth2Strategy<
);
const session: Session | null = sessionCookie.get(this.sessionKey);
const options = {
name: this.name,
sessionKey: this.sessionKey,
sessionStrategyKey: this.sessionStrategyKey,
sessionErrorKey: this.sessionErrorKey,
...checkOptions,
};
Expand Down

0 comments on commit 54f0d1d

Please sign in to comment.