-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Adjust InjectionToken<T> constants in msal-angular to support typed Angular 14+ inject()
#7484
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
Adjust InjectionToken<T> constants in msal-angular to support typed Angular 14+ inject()
#7484
Conversation
…sed with new `inject(TOKEN)` syntax.
@microsoft-github-policy-service agree |
This is related to #7413, and fixes #6006 For anyone having issues with this, you can add some new constants to your own project to replace the existing broken ones. export const TYPED_MSAL_INSTANCE =
MSAL_INSTANCE as unknown as InjectionToken<IPublicClientApplication>;
export const TYPED_MSAL_GUARD_CONFIG =
MSAL_GUARD_CONFIG as unknown as InjectionToken<MsalGuardConfiguration>;
export const TYPED_MSAL_INTERCEPTOR_CONFIG =
MSAL_INTERCEPTOR_CONFIG as unknown as InjectionToken<MsalInterceptorConfiguration>;
export const TYPED_MSAL_BROADCAST_CONFIG =
MSAL_BROADCAST_CONFIG as unknown as InjectionToken<MsalBroadcastConfiguration>; |
bump; still an issue in latest versions @jo-arroyo @peterzenz @tnorling let me know if anything else can be done to move this DX fix along. |
…AD#7623) Splits up /authorize request generation into separate functions for 1. Standard params (included on all requests) 2. Browser auth code params 3. Node auth code params Note: AzureAD#7633 adds another for Browser EAR Note2: Future (uncommitted) work to move /token and /logout to a similar pattern for extensibility and bundle size improvements
We encode all parameters added to the request URI, however, with the introduction of EAR this will cause problems as the request parameters are sent over form post, not QS. This PR moves the encode step to happen during QS generation instead of during parameter addition to support both use cases.
* Fix Date when expires_in as a string (will be fixed in MacOS in the next iteration) * Ignore userSwitch for double brokering (Brokers will help fixing this long term)
Thank you! As this is a breaking change, it will be included in the next major release of MSAL Angular. See #7651 |
@shylasummers why are you closing my PR, re-implementing my work verbatim, and attributing this to yourself? |
@bradkovach If you would like this PR specifically merged, you would need to change the changefile to be a major version type (since this is a breaking change) and change the branch to merge into msal-v5 |
This is done @shylasummers The branches for dev and msal-v5 have diverged. Is dev regularly merged into v5? If these need to be isolated from other commits in the graph, i can make a branch from v5 and cherry pick |
@shylasummers are you able to perform the proper git steps to merge this, or should i make a new branch and another PR? |
Closing in favor of #7653, which is using a different branch (based off of msal-v5 instead of dev) |
This PR adjusts
InjectionToken
instantiation to use the proper template type parameter (instead ofstring
), so that the new Angular 14+inject(TOKEN)
syntax can be used if desired.