当将来自Facebook的电子邮件作为输入声明传递给自我声明的个人资料时,电子邮件验证框消失 [英] Email verification box disappears when passing email from Facebook as input claim to self-asserted profile

查看:118
本文介绍了当将来自Facebook的电子邮件作为输入声明传递给自我声明的个人资料时,电子邮件验证框消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即使用户拒绝从Facebook传递电子邮件声明,我们也要强迫用户提供并验证其电子邮件地址.

We want to force users to provide and verify their email address even when they reject passing their email claim from Facebook.

我们创建了一个业务流程步骤,该步骤从Facebook回来后会调用以下技术资料:

We created an orchestration step which calls the following technical profile after coming back from Facebook:

        <TechnicalProfile Id="SelfAsserted-ConfirmEmailSocial">
          <DisplayName>Confirm email social</DisplayName>
          <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
          <Metadata>
            <Item Key="ContentDefinitionReferenceId">api.selfasserted</Item>
          </Metadata>
          <InputClaims>
            <InputClaim ClaimTypeReferenceId="email" />
          </InputClaims>
          <OutputClaims>
            <OutputClaim ClaimTypeReferenceId="email" PartnerClaimType="Verified.Email" Required="true" />
          </OutputClaims>
        </TechnicalProfile>

如果用户拒绝facebook设置,则代码将按预期工作:显示验证控件. 但是,如果用户接受 facebook设置,则输入字段和验证控件都将消失. (电子邮件已被预先填充)

If the user rejects the facebook setting, the code works as expected: The verification control is shown. However, if the user accepts the facebook setting, both the input field and the verification control disappear. (And the email gets pre-populated)

(有人在这里解释堆栈溢出,该控件太笨了,以至于无法意识到您想验证输入声明 https://stackoverflow .com/a/44429492/509464 ),但我们无法获得建议的解决方案.

(Someone explains here stack overflow that the control is too dumb to realize that you want to verify the input claim https://stackoverflow.com/a/44429492/509464) but we haven't been able to get the suggested solution to work.

我们如何强制验证上一个业务流程步骤中提供的电子邮件?

更新: 看来我们可以通过某种方式使输入声明为只读来创建解决方法. (但前提是它为空).

Update: It seems we could create a workaround by making the input claim read-only somehow. (But only if it was empty).

推荐答案

是的,唯一的选择是将其设置为只读,因为否则我们假定传入的电子邮件已经通过Facebook进行了验证.如果您更改电子邮件,则必须进行验证.您可以修改JavaScript/css以显示控件.或者在自定义策略中,使用输入声明转换将电子邮件声明复制到新的只读声明ID.然后使用输入声明预填充表单.然后使用输出声明显示声明.

Yes the only option is making it read only, since otherwise we assume the passed in email is already verified, which it is with Facebook. If you change the email, then you must verify it. You could modify the JavaScript/css to show the controls. Or in the custom policy, use an input claim transform to copy the email claim into a new read-only claim id. Then pre-populate the form using input claim. Then display the claim using output claim.

这篇关于当将来自Facebook的电子邮件作为输入声明传递给自我声明的个人资料时,电子邮件验证框消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆