-
Notifications
You must be signed in to change notification settings - Fork 434
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
Fabiangosebrink/remove app initializer #1307
Conversation
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
## preloadAuthWellKnownDocument(configId?: string) | ||
|
||
With this method you can explicitly load your auth well-known document to persist it in the configured storage of the lib. This method will perform an http call to load and then save the information. If you do not call this method explicitly, the lib will call it when it is needed for the first time automatically. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method allows you to explicitly load the secure token servers well-known endpoints and persist the settings to the configured storage of this library. This method will perform an http call to load and save the information. If you do not call this method explicitly, the lib will call it when it is needed for the first time automatically.
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
## `eagerLoadAuthWellKnownEndpoints` was removed | ||
|
||
The Auth Well Known Endpoints are always eager loaded expect loading it explicitly using the [preloadAuthWellKnownDocument()](/docs/documentation/public-api#preloadauthwellknowndocumentconfigid-string) method. No option needed anymore. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version 13 to 14
In this version the APP_INITIALIZER
was removed. (See PR).
The library will not do anything until the application interact with it. There is no pre-loading of anything and it does not affect your application's bootstrapping process at all.
You can however explicitly preload the secure token server well-known endpoints with a new method called preloadAuthWellKnownDocument(). As a side effect because the config has to be loaded first, a lot of APIs become reactive and return an Observable now.
All changes are described below.
eagerLoadAuthWellKnownEndpoints
was removed
The secure token server well known endpoints are always eager loaded expect loading it explicitly using the preloadAuthWellKnownDocument() method. No option needed anymore.
Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net |
We do not want to use the APP_INITIALIZER anymore to not confuse or affect the bootstrapping process of the users' app. The config should be set through the loaders and things should kick off when the user interacts with the lib for the first time, like calling a method.
If the user wants to speed up the process, we want to provide a method where you can preload the auth well known document explicitly, so then it is set and not has to be loaded on the start.