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

feat: encrypt the value before storing if a secretKey was specified #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

zjx20
Copy link

@zjx20 zjx20 commented Mar 17, 2017

No description provided.

@DanielKucal
Copy link
Member

Hi @zjx20, thanks for your contribution! This is really nice piece of code, I don't have any reservations.
I will test it working with our repository today. Did you discover any way to set the secretApikey asynchronously? E.g. when it comes from API endpoint. It'll probably be the most common case.

@zjx20
Copy link
Author

zjx20 commented Mar 23, 2017

Did you discover any way to set the secretApikey asynchronously?

I'm not sure if I understand your question. But if you meant that Angular app should able to get secretKey from server side before it ready to run, you could try the APP_INITIALIZER approach (like @nglibs/config do).

@DanielKucal
Copy link
Member

DanielKucal commented Mar 26, 2017

I've tried almost everything, but can't compile my project when using it... Any idea?
image

@zjx20
Copy link
Author

zjx20 commented Mar 27, 2017

Did you get the latest commit of this PR? Then you should have @types/crypto-js and crypto-js in package.json. Also please make sure you have run npm install for these dependencies.

The compilation of this project is somehow broken (mentioned at marcj#80 (comment)). I think there is something different between npm install angular2-logger and npm install git+ https://xxx (just the way we install this package). I had fixed the issue by removing dist/, index.js, index.d.ts and overwriting the content of index.ts with export * from './src/index'; (refer zjx20@9299a1a).
It's not a perfect solution though, because it makes the package not work for pure js projects, I have no idea of how to make it better.

@DanielKucal
Copy link
Member

Of course, I made sure these packages are installed properly several times. I npm-linked this module into my project, but I think the way we get this code doesn't matter in this case, since compiled files are stored here directly (when you install via npm compiliation can be performed in the flow). Thanks for your links and help, I'll investigate it and try to find good solution.

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