mirror of
https://github.com/zitadel/zitadel.git
synced 2025-04-15 20:41:30 +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 (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"html/template"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/zitadel/zitadel/internal/domain"
|
"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 {
|
if data.MFAType == domain.MFATypeTOTP {
|
||||||
code, err := generateQrCode(data.totpData.Url)
|
code, err := generateQrCode(data.totpData.Url)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
data.totpData.QrCode = code
|
data.totpData.QrCode = template.HTML(code)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -706,5 +706,5 @@ type mfaDoneData struct {
|
|||||||
type totpData struct {
|
type totpData struct {
|
||||||
Url string
|
Url string
|
||||||
Secret string
|
Secret string
|
||||||
QrCode string
|
QrCode template.HTML
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user