Daml start, daml.yaml init script and authorization
App Development2 posts386 views2 likesLast activity Mar 2022
SI
Simon_AlexeOP
Mar 2022Hello Daml Forum,
I use “daml start” to start my application.
I have a daml.yaml (sdk-version: 1.17.1) with a sandbox auth. option (ex: sandbox-options: - --auth-jwt-hs256-unsafe=…) and an init-script (init-script: …).
The problem is the init script fails with an obvious UNAUTHENTICATED error as “daml start” does not add the --access-token-file option when calling the init script.
Is there a way to add this option to the daml.yaml? I couldn’t find anything in the documentation.
Thank you in advance
CO
cocreature
Mar 2022You can specify script-options in your daml.yaml file which will be passed to daml script when daml start executes your init script. So for your problem, add something like this to your daml.yaml:
script-options:
- --access-token-file=path/to/yourtokenfile