Charef/taa 252 update the theauthapi code samples js#2
Charef/taa 252 update the theauthapi code samples js#2
Conversation
seventy6
commented
Sep 12, 2022
- made a few changes
- null needs to be "null" on customUserId
| featureFlagTwo: false, | ||
| }, | ||
| expiry: new Date("2023-09-01 00:00:00"), // optional expiry date | ||
| expiry: "2023-09-01 00:00:00", // optional expiry date |
There was a problem hiding this comment.
This one works, but I'm curios on why you're favoring expiry as string instead of a date object 🤔
There was a problem hiding this comment.
The date object was causing an error when posting to the server. I removed it for speed!
| customUserId: null, | ||
| }) | ||
| console.log('Keys filtered using customUserId', customUserIdFilteredKey); | ||
| customUserId: "null", |
There was a problem hiding this comment.
I think leaving this as null instead of "null" is better, it feels more natural to pass null as null instead of a string
There was a problem hiding this comment.
The server borked with the null value.
| featureFlagOne: true, | ||
| featureFlagTwo: false, | ||
| }, | ||
| expiry: new Date("2023-09-01 00:00:00"), // optional expiry date |
There was a problem hiding this comment.
While this works fine, expiry is expected to be a Date object, we want the users to use the library just like any other JS code, passing expiry as a date feels more natural in a JS environment
There was a problem hiding this comment.
See the comment before. Can you test using the JS Date object?