mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
fix: rendering of TOTP QR code (#7549)
This commit is contained in:
parent
0e181b218c
commit
a28b3a1c2d
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -706,5 +706,5 @@ type mfaDoneData struct {
|
||||
type totpData struct {
|
||||
Url string
|
||||
Secret string
|
||||
QrCode string
|
||||
QrCode template.HTML
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user