Coder Social home page Coder Social logo

Comments (5)

copperwall avatar copperwall commented on May 26, 2024 1

Ah yeah, I see what you mean. Thanks for pointing that out! I'll make a PR right now.

from auth-app.js.

copperwall avatar copperwall commented on May 26, 2024

Oh yeah definitely! I'll get on that

from auth-app.js.

copperwall avatar copperwall commented on May 26, 2024

Hey @gr2m, I was looking into documenting this, but it looks like timeDifference lives in the state parameter to auth instead of options parameter that the user passes in. So it doesn't look like that option is available for the user to configure.

We could add it as an option and then initialize the state with the timeDifference from options, or leave it undocumented? What do you think?

from auth-app.js.

gr2m avatar gr2m commented on May 26, 2024

hmm sorry I found timeDifference defined in StrategyOptions:

auth-app.js/src/types.ts

Lines 76 to 89 in 90bc639

export type StrategyOptions = {
id: number | string;
privateKey: string;
installationId?: number | string;
clientId?: string;
clientSecret?: string;
request?: OctokitTypes.RequestInterface;
cache?: Cache;
timeDifference?: number;
log?: {
warn: (message: string, additionalInfo?: object) => any;
[key: string]: any;
};
};

but it really should only be set on State instead. I just checked and everything still works if we do the change

diff --git a/src/types.ts b/src/types.ts
index 7093605..99ca9a3 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -81,7 +81,6 @@ export type StrategyOptions = {
   clientSecret?: string;
   request?: OctokitTypes.RequestInterface;
   cache?: Cache;
-  timeDifference?: number;
   log?: {
     warn: (message: string, additionalInfo?: object) => any;
     [key: string]: any;
@@ -125,6 +124,7 @@ export type State = StrategyOptions & {
   installationId?: number;
   request: OctokitTypes.RequestInterface;
   cache: Cache;
+  timeDifference?: number;
   log: {
     warn: (message: string, additionalInfo?: object) => any;
     [key: string]: any;

Would you like to send a PR for that?

from auth-app.js.

github-actions avatar github-actions commented on May 26, 2024

🎉 This issue has been resolved in version 2.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

from auth-app.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.