Skip to content
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

Merged
merged 14 commits into from
Sep 17, 2020

Conversation

joshcanhelp
Copy link
Contributor

  • 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();
Copy link
Contributor Author

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 {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved up

@joshcanhelp joshcanhelp changed the title Update Rule headers and required configuration Update Rule headers and required configuration + release Sep 17, 2020
Copy link

@seejee seejee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!

@joshcanhelp joshcanhelp merged commit c7c041c into master Sep 17, 2020
@joshcanhelp joshcanhelp deleted the update-rule-headers branch September 17, 2020 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants