samples icon indicating copy to clipboard operation
samples copied to clipboard

misalignment between code and doc

Open fhenri opened this issue 8 years ago • 1 comments

Hi,

The first issue is

For the AWS Cognito examples using lambda, it is said in doc to use the following env variable: BOX_PRIVATE_KEY_PASSPHRASE = <YOUR_APP_PRIVATE_KEY_PASSPHRASE>

but the lambda code is using BOX_PRIVATE_KEY_PASSWORD (see https://github.com/box/samples/blob/cognito_integration/box-node-cognito-lambdas-sample/tokenExchange/box-manager.js#L16)

The second issue is with the angular2 application

Its mentioned to add a custom attribute called custom:box_appuser_id which will store the box id for the given account.

but the application is using box_appuser_token (see https://github.com/box/samples/blob/master/box-aws-cognito-angular2-skeleton-app-sample/src/app/config/box/box.config.ts#L10)

fhenri avatar Sep 27 '17 13:09 fhenri

Hey @fhenri, thanks for the feedback! I've updated the AWS Cognito example to use two newer features of Box.

First, you'll only use the BOX_CONFIG environment variable and paste in the contents of the configuration file that is generated for you when you generate a private/public keypair through the Box Developer Console.

Second, the integration now uses Box's external_app_user_id which alleviates a lot of extra code for storing App User IDs on Cognito metadata fields, thus no more custom attribute "custom:box_appuser_id".

Finally, the box_appuser_token config value in the Angular application is actually the string used as a key for storing App User tokens in Local Storage in the browser for caching.

Thanks again for the feedback!

allenmichael avatar Nov 06 '17 20:11 allenmichael