-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
web/flows: don't autoclose in redirect stage if redirecting to non-ht…
…tp protocol (#5506) Signed-off-by: Jens Langhammer <[email protected]>
- Loading branch information
Showing
2 changed files
with
10 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,25 @@ | ||
import "@goauthentik/elements/EmptyState"; | ||
import "@goauthentik/flow/FormStatic"; | ||
import { AccessDeniedStage } from "@goauthentik/flow/stages/access_denied/AccessDeniedStage"; | ||
import { BaseStage } from "@goauthentik/flow/stages/base"; | ||
|
||
import { t } from "@lingui/macro"; | ||
|
||
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 AccessDeniedStage { | ||
export class DeviceCodeFinish extends BaseStage< | ||
OAuthDeviceCodeFinishChallenge, | ||
OAuthDeviceCodeFinishChallenge | ||
> { | ||
render(): TemplateResult { | ||
if (!this.challenge) { | ||
return html`<ak-empty-state ?loading="${true}" header=${t`Loading`}> </ak-empty-state>`; | ||
} | ||
return html`<header class="pf-c-login__main-header"> | ||
<h1 class="pf-c-title pf-m-3xl">${this.challenge.flowInfo?.title}</h1> | ||
</header> | ||
<div class="pf-c-login__main-body"> | ||
<form class="pf-c-form"> | ||
<div class="pf-c-form__group"> | ||
<p class="big-icon"> | ||
<i class="pf-icon pf-icon-ok"></i> | ||
</p> | ||
<h3 class="pf-c-title pf-m-3xl reason"> | ||
${t`You've successfully authenticated your device.`} | ||
</h3> | ||
<hr /> | ||
<p>${t`You can close this tab now.`}</p> | ||
</div> | ||
</form> | ||
</div> | ||
<footer class="pf-c-login__main-footer"> | ||
<ul class="pf-c-login__main-footer-links"></ul> | ||
</footer>`; | ||
return html`<ak-empty-state icon="fas fa-check" header=${t`You may close this page now.`}> | ||
<span slot="body"> ${t`You've successfully authenticated your device.`} </span> | ||
</ak-empty-state>`; | ||
} | ||
} |
This file contains 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