feat(meta): expose per-method MFA availability for the login UI#681
Merged
Conversation
- add is_totp_mfa_enabled, is_email_otp_mfa_enabled, is_sms_otp_mfa_enabled, is_webauthn_enabled to the public Meta type (GraphQL + proto) - derive OTP/TOTP flags with the same per-method gating login enforces; webauthn is always-on (no operator flag) - lets the hosted login app render only the MFA methods the instance supports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds four booleans to the public
metaquery so the hosted login UI (authorizer-react's new AuthorizerMFASetup) shows only the MFA methods the instance actually supports.is_totp_mfa_enabled=EnableMFA && EnableTOTPLoginis_email_otp_mfa_enabled=EnableMFA && EnableEmailOTP && IsEmailServiceEnabledis_sms_otp_mfa_enabled=EnableMFA && EnableSMSOTP && IsSMSServiceEnabledis_webauthn_enabled=true(WebAuthn/passkey shipped always-on in feat(webauthn): add passkey registration and login support #671; confirmed no disable flag exists)Derivations mirror the per-method gating in
login.goand the aggregateisMFAServiceAvailable()from #679. Added totype Meta(GraphQL) +Metaproto (fields 22-25, additive) + the gRPC handler mapping; populated on the PUBLIC meta (not AdminMeta).Maps 1:1 onto authorizer-react's
availableMfaMethodsprop ({ totp, passkey, emailOtp, smsOtp }), so the login app can drive the MFA-setup hub straight from meta.Testing
TestMetaextended (default → totp/email/sms false, webauthn true; MFA+TOTP → totp true; email/SMS gated on service). Full sqlite integration suite green; build/vet/golangci-lint/codegen parity clean. Makefile untouched.