diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-06-15 19:52:47 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-06-15 19:52:47 -0500 |
commit | 81441c3c265ae6e733365dcba01f7da650f5b1f9 (patch) | |
tree | 475756f106357ed7cda42dacbdb7f9c3f722a1de /README.md | |
parent | 77b938845aa909a70f896b759b04ba7c1b1d9aa6 (diff) | |
download | voidsky-81441c3c265ae6e733365dcba01f7da650f5b1f9.tar.zst |
Improve readme notes
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/README.md b/README.md index ba8b3cf25..785060147 100644 --- a/README.md +++ b/README.md @@ -29,12 +29,30 @@ Uses: ## Various notes -- ["SSO" flows on mobile](https://developer.okta.com/blog/2022/01/13/mobile-sso) - - Suggests we might want to use `ASWebAuthenticationSession` on iOS - - [react-native-inappbrowser-reborn](https://www.npmjs.com/package/react-native-inappbrowser-reborn) with `openAuth: true` might be worth exploring - - We might even [get rejected by the app store](https://community.auth0.com/t/react-native-ios-app-rejected-on-appstore-for-using-react-native-auth0/36793) if we don't -- Cryptography - - We rely on [isomorphic-webcrypto](https://github.com/kevlened/isomorphic-webcrypto) - - For the CRNG this uses [react-native-securerandom](https://github.com/robhogan/react-native-securerandom) which provides proper random on mobile - - For the crypto this uses [msrcrypto](https://github.com/kevlened/msrCrypto) - but we should consider switching to [the MS maintained version](https://github.com/microsoft/MSR-JavaScript-Crypto) - - In the future it might be preferable to move off of msrcrypto and use iOS and Android native modules, but nothing is available right now \ No newline at end of file +### Env vars + +Set using the `.env` file or using bash. + +``` +REACT_APP_AUTH_LOBBY = 'http://localhost:3001' +``` + +### Build behaviors + +The `metro.config.js` file rewrites a couple of imports. This is partly to work around missing features in Metro, and partly to patch the bundle. Affected imports include: + +- ucans +- one-webcrypto + +### Cryptography + +For native builds, we must provide a polyfill of `webcrypto`. We use [react-native-securerandom](https://github.com/robhogan/react-native-securerandom) for the CRNG and [msrcrypto](https://github.com/kevlened/msrCrypto) for the cryptography. + +**NOTE** Keys are not currently stored securely. + +### Polyfills + +`./platform/polyfills.*.ts` adds polyfills to the environment. Currently this includes: + +- webcrypto +- TextEncoder / TextDecoder \ No newline at end of file |