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 instruction on persister warning and update README #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dahuang37
Copy link
Contributor

No description provided.

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.
Copy link
Contributor

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;
Copy link
Contributor

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

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.
Copy link
Contributor

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? :)

Comment on lines +27 to +29
// 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;
Copy link
Contributor

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

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.
Copy link
Contributor

@notasecret notasecret Jul 3, 2021

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?

Copy link
Contributor

@notasecret notasecret left a 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

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.

None yet

2 participants