-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Rule headers and required configuration + release #252
Conversation
joshcanhelp
commented
Sep 16, 2020
- Add all configuration values to the Rule header
- Skip the Rule if required configuration is not present. If someone installs this Rule then hits Save without configuring, login is suddenly broken. That's a BIG gotcha. In this case, the Rule will simple not function until those values are saved.
@@ -42,8 +64,7 @@ function consentricIntegration(user, context, callback) { | |||
|
|||
// Returns Consentric API Access Token (JWT) from either the global cache or generates it anew from clientId and secret | |||
const getConsentricApiAccessToken = async () => { | |||
const consentricApiTokenNotValid = (!global.consentricApiToken) || | |||
global.consentricApiToken.exp < new Date().getTime(); | |||
const consentricApiTokenNotValid = !global.consentricApiToken || global.consentricApiToken.exp < Date.now(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Swap new Date().getTime()
for Date.now()
@@ -19,13 +44,6 @@ async function iddatawebVerificationWorkflow(user, context, callback) { | |||
configuration | |||
); | |||
|
|||
const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!!