question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Package configuration via service

See original GitHub issue

Describe the problem you’d like to have solved

My organization does not use the angular environment files for build variables because that method forces the application to be rebuilt in every CI/CD environment which introduces instability. Instead, we include an appSettings.json file with our package and let the application query for environment specific variables on load. This means that configuration via the module.forRoot() parameters isn’t possible as it replies on a typescript file getting compiled into the app.

Describe the ideal solution

Our internal configuration provider package is designed to grab the values out of appSettings and provide them in a service to the app. Ideally Auth0 would give us the option to delay configuration until services are provided like so:

constructor(
    public configService: NgAppConfigService,
    public auth0: Auth0Service) { 

    const config = this.configService.getconfig();
    this.auth0.initialize(config.auth0Settings);
}

Alternatives and current work-arounds

Our current workaround is to use our internal Auth0 wrapper (@sigao/ng-auth0) that allows for initialization via the service. However, we would like to switch over to using the SDK if possible.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:20

github_iconTop GitHub Comments

3reactions
stevehobbsdevcommented, Oct 12, 2020

@brandon-sigao We have a solution ready to go, would appreciate your thoughts on it to make sure it would meet your needs: #62

3reactions
gagaXDcommented, Sep 17, 2020

Hey there,

My organization also use a service to resolve environment dynamically, with the APP_INITIALIZER provider.

With the configuration in the forRoot, we aren’t able to use our dynamically load environment.

Initializing the auth0 client later in the app process, could be a great improvment

Read more comments on GitHub >

github_iconTop Results From Across the Web

Step 4: Adding Package Configurations - SQL - Microsoft Learn
The packages in the Deployment Tutorial project use a combination of XML configuration files and indirect configurations. An XML configuration ...
Read more >
SQL Server Integration Services Package Configuration
The way that you use the package configuration file starts with setting it up from within your package. You right click on the...
Read more >
Overview of Package Configuration in SSIS - MindMajix
Learn Enabling and Configuring Package Configurations in SQL Server Integration Services with examples. Read for More!
Read more >
package configuration in ssis | SQL Server ... - YouTube
SQL Server Integration Services (SSIS) Tutorial. package configuration in ssis | SQL Server Configurations in SSIS | types of SSIS ...
Read more >
Simple Steps to Creating SSIS Package Configuration File
Package configuration files make deployment of SSIS packages easier, more manageable, and less error prone compared to the process of deploying ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found