Migrate Angular example to Angular 22 and angular-oauth2-oidc 22 - #40
Closed
Wictorgirardi wants to merge 2 commits into
Closed
Wictorgirardi wants to merge 2 commits into
Wictorgirardi wants to merge 2 commits into
Conversation
Contributor
Author
|
Combined into #44 with the other SPA examples. The changes are the same; only the commit SHAs differ. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #28: this branch includes its commit, so review the last commit only until #28 is merged.
Summary
ng newfrom Angular CLI 22.2 (standalone, zoneless,@angular/buildapplication builder, Vitest unit tests), plusangular-eslint22.5 with ESLint 10.@angular-devkit/build-angular,@angular/animationsandplatform-browser-dynamicare removed..postcssrc.jsonand@tailwindcss/postcss. Before, v4 was installed but set up the v3 way: the builder ignoredpostcss.config.jsand loaded the v3 plugin.npm installfailed on ajasmine-corepeer conflict. The stalepackage-lock.json(Angular 18) is gone; the example uses pnpm 10.34 (packageManager) and Node 24.provideAppInitializer, instead of a component constructor that didn't await discovery.AuthServiceexposes the login state and the decoded tokens.@if,inject()and real<button>s.ng serveuses the local Keycloak from Add shared CI workflows, local Keycloak and contributing guide #28./index.html.offline_accessscope (offline tokens) andshowDebugInformationare removed.classNameReact-ism fixed, and the GitHub link now points to this example.NullInjectorErrorand missing<h1>issues are gone.vercel.jsonpins the Angular preset and output directory. The workflow calls the shared CI and deploy workflows.Test plan
pnpm install --frozen-lockfile && pnpm lint && pnpm test && pnpm buildpass on Node 24; 3 tests pass.tools/e2e-smokepasses against the local Keycloak on port 4200.Docs drift
blog/2024-08-01-secure-angular.mdxandtemplates/frameworks/_angular.mdx(L9–93):authCodeFlowConfigsnippet (/index.htmlredirect,offline_access, debug) →src/app/auth/auth.config.tsplus the environment files.provideAppInitializerandAuthService.*ngIf→@if.user.component.ts→user-status/user-status.ts, following the Angular 20+ file naming.