fix: rendering of TOTP QR code (#7549)

This commit is contained in:
Livio Spring 2024-03-12 17:20:42 +01:00 committed by GitHub
parent 0e181b218c
commit a28b3a1c2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@ package login
import (
"bytes"
"html/template"
"net/http"
"github.com/zitadel/zitadel/internal/domain"
@ -76,7 +77,7 @@ func (l *Login) renderMFAInitVerify(w http.ResponseWriter, r *http.Request, auth
if data.MFAType == domain.MFATypeTOTP {
code, err := generateQrCode(data.totpData.Url)
if err == nil {
data.totpData.QrCode = code
data.totpData.QrCode = template.HTML(code)
}
}

View File

@ -706,5 +706,5 @@ type mfaDoneData struct {
type totpData struct {
Url string
Secret string
QrCode string
QrCode template.HTML
}