Question regarding Angular 11 support
Can I use this library in Angular 11 project or does it only support upto Angular 10 at the moment? If no support for Angular 11 do you know when support will be provided please?
Many thanks.
Heya! I presume it should work. Have you tried it yet?
If it doesn't, and changes are straightforward, I suppose a PR would be welcome? Though I'm not sure when the maintainer has or can make time to roll it out.
Hiya,
Thanks for responding so quickly, no I haven't tried it yet, thought I would ask the question before I did that. From your response it sounds like you believe it 'should' work.
Would presume so, yes! An easy way to test is to clone my sample repository, upgrade it to Angular 11, and run ng e2e to see if the main integration scenarios still work.
Let us know what you find!
Looks like it does not work:
I tried on a new Angular 11 project.
npm ERR! Could not resolve dependency:
npm ERR! peer zone.js@"~0.10.3" from @angular/[email protected]
Fair enough! I'll change the labels.
Great thanks for that. I'm guessing this should be fairly straight forward and 'just' a matter of changing the dependencies to Angular 11
While that sample repo might need some kind of an update, the lib works fine with Angular 11. I am using it right now.
Do we know anything about the status of this?
I've cloned and updated said repo and it doesn't work. At my company App we moved forward with Angular 11 and sometimes sets the HTTP version to undefined
Tried to use the plugin with angular 11, but having dependency errors. Will the plugin be updated to support angular 11?
I upgraded an older project to angular 11 and in my development environment the app just worked with this library.
However, for stage/production I got a headache with routing.
It was like this in the past:
RouterModule.forRoot(
appRoutes,
{ useHash: false, enableTracing: environment.traceRouting, initialNavigation: false }
)
but was change to
RouterModule.forRoot(
appRoutes,
{ useHash: false, enableTracing: environment.traceRouting, initialNavigation: 'disabled', relativeLinkResolution: 'legacy' }
)
in the upgrade process. Authentication works fine when the app runs in the webserver documentroot but fails with some website.com/myapp when build with "--base-href /myapp/", which I do for stage/production.
Redirect by keycloak leads to website.com, not to website.com/myapp, so the token is never processed by angular.
Still investigating.
Has @manfredsteyer mentioned anything? We seem to be stuck in the same position as mentioned in #726
I don't want him to burn out, which is always a risk in open-source, but the radio silence is worrying.
I did create a PR #1037 to update the repository to NG11.
However, I still have a feeling that you can use earlier versions of the library just fine in an Angular 11 application. I'd welcome any above (or future) posters to create a minimal repro that shows otherwise, so we can investigate (and check if my PR would solve anything).
Either way, at some point this update needs to be done, I guess.
Thanks, @jeroenheijmans. Yes, the lib works fine with Angular 11. However, we should do an official update to emphasize this a bit more. I'll merge the PR soon.
@manfredsteyer Just in case any issues come up merging in PRs, could you do a npm publish of angular-oauth2-oidc-jwks using the existing 10.0.0 git tag? The only version of that package available via npm at the moment is 9.0.0, and what I'm seeing in the repo for 10.0.0 looks like it might already resolve one of our dependency issues, if we could install it.
鈽濓笍 #873
So although it might be worthwhile to upgrade the library with my PR, it is _not_ needed for Angular 11 support (as per the original question in this issue).
Will leave issue open for #1037 though.
Thanks @jeroenheijmans. While it does appear to work presently, we do still see the peer dependency warning as noted in #873 when installing angular-oauth2-oidc-jwks. As mentioned in my previous comment, I think we just need the existing 10.0.0 git tag published to npm for angular-oauth2-oidc-jwks and that warning should go away. The main angular-oauth2-oidc package already has 10.x versions published that use tslib 2.x, so the jwks package has fallen behind. I'm hoping that @manfredsteyer can publish that soon, regardless of any merging of additional PRs.
v12 is out since recently so I think we can now close this issue.
Most helpful comment
Thanks, @jeroenheijmans. Yes, the lib works fine with Angular 11. However, we should do an official update to emphasize this a bit more. I'll merge the PR soon.