Files
authentik/web/src/flow/providers/oauth2/DeviceCodeFinish.ts
T
Jens L. 0021e5fa25 web/flows: fix bottom padding when loading challenge (#15372)
* web/flows: fix bottom padding when loading challenge

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* add base class that does layout for login cards

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* ok actually rework the whole thing

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix leftover div

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix other stages

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* better declare loading state

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* format

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix tests

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
2025-07-03 22:07:22 +02:00

32 lines
1.1 KiB
TypeScript

import "@goauthentik/elements/EmptyState";
import "@goauthentik/flow/FormStatic";
import "@goauthentik/flow/components/ak-flow-card.js";
import { BaseStage } from "@goauthentik/flow/stages/base";
import { msg } from "@lit/localize";
import { TemplateResult, html } from "lit";
import { customElement } from "lit/decorators.js";
import { OAuthDeviceCodeFinishChallenge } from "@goauthentik/api";
@customElement("ak-flow-provider-oauth2-code-finish")
export class DeviceCodeFinish extends BaseStage<
OAuthDeviceCodeFinishChallenge,
OAuthDeviceCodeFinishChallenge
> {
render(): TemplateResult {
return html`<ak-flow-card .challenge=${this.challenge}>
<ak-empty-state icon="fas fa-check">
<span>${msg("You may close this page now.")}</span>
<span slot="body"> ${msg("You've successfully authenticated your device.")} </span>
</ak-empty-state>
</ak-flow-card>`;
}
}
declare global {
interface HTMLElementTagNameMap {
"ak-flow-provider-oauth2-code-finish": DeviceCodeFinish;
}
}