web/flows: fix redirect loop when sentry is enabled

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-26 17:45:09 +02:00
parent 58712828a4
commit 50f0c11c0b
2 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ import { me } from "./Users";
import { config } from "./Config";
import { Config } from "authentik-api";
export function configureSentry(): Promise<Config> {
export function configureSentry(canDoPpi: boolean = false): Promise<Config> {
return config().then((config) => {
if (config.errorReportingEnabled) {
Sentry.init({
@ -47,7 +47,7 @@ export function configureSentry(): Promise<Config> {
},
});
console.debug("authentik/config: Sentry enabled.");
if (config.errorReportingSendPii) {
if (config.errorReportingSendPii && canDoPpi) {
me().then(user => {
Sentry.setUser({ email: user.user.email });
console.debug("authentik/config: Sentry with PII enabled.");

View File

@ -41,7 +41,7 @@ export class SidebarBrand extends LitElement {
}
firstUpdated(): void {
configureSentry().then((c) => {this.config = c;});
configureSentry(true).then((c) => {this.config = c;});
}
render(): TemplateResult {