web/flows: fix redirect loop when sentry is enabled
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
58712828a4
commit
50f0c11c0b
|
@ -6,7 +6,7 @@ import { me } from "./Users";
|
||||||
import { config } from "./Config";
|
import { config } from "./Config";
|
||||||
import { Config } from "authentik-api";
|
import { Config } from "authentik-api";
|
||||||
|
|
||||||
export function configureSentry(): Promise<Config> {
|
export function configureSentry(canDoPpi: boolean = false): Promise<Config> {
|
||||||
return config().then((config) => {
|
return config().then((config) => {
|
||||||
if (config.errorReportingEnabled) {
|
if (config.errorReportingEnabled) {
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
|
@ -47,7 +47,7 @@ export function configureSentry(): Promise<Config> {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.debug("authentik/config: Sentry enabled.");
|
console.debug("authentik/config: Sentry enabled.");
|
||||||
if (config.errorReportingSendPii) {
|
if (config.errorReportingSendPii && canDoPpi) {
|
||||||
me().then(user => {
|
me().then(user => {
|
||||||
Sentry.setUser({ email: user.user.email });
|
Sentry.setUser({ email: user.user.email });
|
||||||
console.debug("authentik/config: Sentry with PII enabled.");
|
console.debug("authentik/config: Sentry with PII enabled.");
|
||||||
|
|
|
@ -41,7 +41,7 @@ export class SidebarBrand extends LitElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
firstUpdated(): void {
|
firstUpdated(): void {
|
||||||
configureSentry().then((c) => {this.config = c;});
|
configureSentry(true).then((c) => {this.config = c;});
|
||||||
}
|
}
|
||||||
|
|
||||||
render(): TemplateResult {
|
render(): TemplateResult {
|
||||||
|
|
Reference in a new issue