Skip to content

Commit

Permalink
Merge pull request #1960 from timdeschryver/migration-docs
Browse files Browse the repository at this point in the history
docs: add migration docs
  • Loading branch information
damienbod authored Jun 8, 2024
2 parents cb9f426 + 9760a0f commit dfe5500
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 9,197 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 6
sidebar_position: 95
---

# Version 15 to 16
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
sidebar_position: 94
---

# Version 16 to 17

## TL;DR: Breaking Changes

- There should be no breaking changes in this version.
41 changes: 41 additions & 0 deletions docs/site/angular-auth-oidc-client/docs/migrations/v17-to-v18.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
sidebar_position: 93
---

# Version 17 to 18

## TL;DR: Breaking Changes

- Dropped support for Angular 15

## TL;DR: New Features

- Add new standalone/functional API's

## Dropped support for Angular 15

Angular 15 support is dropped because we want to make us of [Signals](https://angular.dev/guide/signals).

## Add `authenticated` and `userData` Signals to the `OidcSecurityService` service

```ts
@Component({
selector: 'app-root',
template: `
@if (authenticated().isAuthenticated) {
<pre>{{ userData() | json }}</pre>
} @else {
<div>You are not authenticated.</div>
}
`,
})
export class AppComponent {
private readonly oidcSecurityService = inject(OidcSecurityService);

// Signal containing authenticated state
protected readonly authenticated = this.oidcSecurityService.authenticated;

// Signal containing user data
protected readonly userData = this.oidcSecurityService.userData;
}
```
Loading

0 comments on commit dfe5500

Please sign in to comment.