Skip to content
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

Merged
merged 72 commits into from
Dec 20, 2021

Conversation

FabianGosebrink
Copy link
Collaborator

@FabianGosebrink FabianGosebrink commented Nov 21, 2021

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.

  • docs
  • testing
  • migration guide

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@FabianGosebrink FabianGosebrink self-assigned this Dec 13, 2021
@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

@github-actions
Copy link

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.

Copy link
Owner

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.

@github-actions
Copy link

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.

Copy link
Owner

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.

@damienbod damienbod merged commit 9fc89c8 into main Dec 20, 2021
@damienbod damienbod deleted the fabiangosebrink/remove-app-initializer branch December 20, 2021 10:39
@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-hill-002425310-1307.centralus.azurestaticapps.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants