mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
fix: remove u2f with pin from 2fa check (#1121)
* fix: remove u2f with pin from 2fa check * show error message on mfa init verify
This commit is contained in:
parent
410a53f15b
commit
e15fc0b92b
@ -60,6 +60,9 @@ func (l *Login) renderMFAVerifySelected(w http.ResponseWriter, r *http.Request,
|
||||
case model.MFATypeOTP:
|
||||
data.MFAProviders = removeSelectedProviderFromList(verificationStep.MFAProviders, model.MFATypeOTP)
|
||||
data.SelectedMFAProvider = model.MFATypeOTP
|
||||
default:
|
||||
l.renderError(w, r, authReq, err)
|
||||
return
|
||||
}
|
||||
l.renderer.RenderTemplate(w, r, l.renderer.Templates[tmplMFAVerify], data, nil)
|
||||
}
|
||||
|
@ -35,6 +35,8 @@
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{ template "error-message" .}}
|
||||
|
||||
<div class="actions">
|
||||
<button class="primary" id="submit-button" type="submit">{{t "Actions.Next"}}</button>
|
||||
<a class="button secondary" href="{{ mfaPromptChangeUrl .AuthReqID .MFAType }}">
|
||||
|
@ -163,19 +163,6 @@ func (u *UserView) MFATypesAllowed(level req_model.MFALevel, policy *iam_model.L
|
||||
}
|
||||
}
|
||||
//PLANNED: add sms
|
||||
fallthrough
|
||||
case req_model.MFALevelMultiFactor:
|
||||
if policy.HasMultiFactors() {
|
||||
for _, mfaType := range policy.MultiFactors {
|
||||
switch mfaType {
|
||||
case iam_model.MultiFactorTypeU2FWithPIN:
|
||||
if u.IsPasswordlessReady() {
|
||||
types = append(types, req_model.MFATypeU2FUserVerification)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//PLANNED: add token
|
||||
}
|
||||
return types, required
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user