Skip to content

Commit 9699fae

Browse files
committed
propagate logout
1 parent 3bc2412 commit 9699fae

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/v2/components/header/Header.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,7 @@ export class Header extends LitElement {
665665
}
666666
this.authState = 'logged-out'
667667
this.dispatchEvent(new CustomEvent('logout-select', {
668+
detail: { role: 'logout' },
668669
bubbles: true,
669670
composed: true
670671
}))

src/v2/components/header/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,10 @@ If you want a fully custom login UI you can override the slot:
156156
</script>
157157
```
158158

159-
The component dispatches `auth-action-select` for logged-out actions and `account-menu-select` for logged-in account choices.
160-
When `authState` is `logged-in`, the dropdown always renders the configured `logoutAction` as the last item.
159+
The built-in logout button automatically transitions the header from `logged-in` to `logged-out`, and emits a bubbling, composed `logout-select` event with `detail: { role: 'logout' }`.
160+
161+
The component also dispatches `auth-action-select` for logged-out actions and `account-menu-select` for logged-in account choices.
162+
When `authState` is `logged-in`, the dropdown always renders the configured `logoutLabel` as the last item.
161163

162164
## Styles
163165

0 commit comments

Comments
 (0)