Skip to content

Commit

Permalink
chore: remove if condition
Browse files Browse the repository at this point in the history
  • Loading branch information
giriparus committed May 16, 2024
1 parent 8b92e3f commit d9a5e24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions oidc-consumer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ class OidcConsumer {
* @param retryOnFailure - Flag to throw error if found or recursively call itself
* @throws SESSION_VERIFICATION_FAILED if session verification fails.
*/
async verifySession(request: Request, response: Response, next: NextFunction, retryOnFailure: Boolean = true, sessionRetryDelayMS: number = this.timeout) {
async verifySession(request: Request, response: Response, next: NextFunction, retryOnFailure: Boolean = true, sessionRetryDelayMS: number = this.sessionRetryDelayMS) {
await new Promise<void>(resolve => {
request.session.reload((err) => {
if(err) {
Expand All @@ -289,7 +289,7 @@ class OidcConsumer {
console.log("error in retry")
});
}
else if (!state && !retryOnFailure) {
else {
return next(new Error("SESSION_VERIFICATION_FAILED"));
}
};
Expand Down
2 changes: 1 addition & 1 deletion oidc-consumer/src/interfaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Session, SessionData, SessionOptions } from "express-session";
import { ModuleOptions } from "simple-oauth2";

export interface IConsumerOptions {
timeout: number;
sessionRetryDelayMS: number;
scope: string;

callback_route?: string;
Expand Down

0 comments on commit d9a5e24

Please sign in to comment.