-
Notifications
You must be signed in to change notification settings - Fork 0
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 instruction on persister warning and update README #6
base: main
Are you sure you want to change the base?
Conversation
let persister = new LocalStoragePersister(); | ||
const c = new Crypto("<>", persister); | ||
// By default, JS SDK uses in-memory persister. | ||
// *****WARNING*****: DO NOT USE LocalStoragePersister for any purpose other than testing locally on browser. |
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.
So then can we move this warning? There's no more LocalStoragePersister?
const c = new Crypto("<>", persister); | ||
// By default, JS SDK uses in-memory persister. | ||
// *****WARNING*****: DO NOT USE LocalStoragePersister for any purpose other than testing locally on browser. | ||
let persister = null; |
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.
Ok. so what is a null persister and why do I have to do it? :-p
// By default, JS SDK uses in-memory persister. | ||
// *****WARNING*****: DO NOT USE LocalStoragePersister for any purpose other than testing locally on browser. | ||
let persister = null; | ||
const c = new Crypto("insert-your-api-key-here", persister); |
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.
Same question on null persister
// *****WARNING*****: DO NOT USE LocalStoragePersister for any purpose other than testing locally | ||
let persister = new LocalStoragePersister(); | ||
const c = new Crypto("<>", persister); | ||
// By default, JS SDK uses in-memory persister. |
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.
I have to pass in a null persister to get this default behavior? Is this more secure? Why? :)
// By default, JS SDK uses in-memory persister. | ||
// *****WARNING*****: DO NOT USE LocalStoragePersister for any purpose other than testing locally on browser. | ||
let persister = null; |
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.
Same comments on these 3 lines...
// By default, JS SDK uses in-memory persister. | ||
// *****WARNING*****: DO NOT USE LocalStoragePersister for any purpose other than testing locally on browser. | ||
let persister = null; | ||
const c = new Crypto("insert-your-api-key-here", persister); |
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.
I thought I added the Demo Org APIKEY so that the demo would just work?
@@ -4,6 +4,7 @@ interface Persister { | |||
exists(key: string): boolean; | |||
} | |||
|
|||
// *****WARNING*****: DO NOT USE LocalStoragePersister for any purpose other than testing locally on browser. |
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.
Not sure we can say "DO NOT USE" ... if that's really the case, lets get ride of it...
but I think the bottom line is that "We do not recommend using LocalStoragePersister for high-value data assets" and we can say why, it's much more helpful than just telling them what to do. Discuss the tradeoff between performance and security, it's not our app, it's not our decision, but we can inform them and let them make their own decisions?
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.
Thanks for the PR, just a few minor thoughts shared though
No description provided.