0

I am trying to use a QR code for totp mfa in an Azure B2C. In my development environment this works fine, however when I moved the custom policy to our PROD environment the QR code doesnt show. The links to the goolge play and apple app store are also missing.

In the console I am seeing a error stating, "Uncaught Error: code length overflow. (1580>1056). Below is a screenshot of the error and missing qr code and link. Any help would be greatly appreciated.

enter image description here

EDIT: I just retested this with the policy sample from HERE in my new B2C instance and I see the exact same issue.

enter image description here

Andrew Wiebe
  • 111
  • 13

1 Answers1

0

After backtracking through the sample I figured this out. The issue is this section:

<ClaimsTransformation Id="CreateIssuer" TransformationMethod="CreateStringClaim"> <InputParameters> <InputParameter Id="value" DataType="string" Value="{AuthenticatorIssuer}" /> </InputParameters> <OutputClaims> <OutputClaim ClaimTypeReferenceId="issuer" TransformationClaimType="createdClaim" /> </OutputClaims> </ClaimsTransformation>

This takes the AuthenticatorIssuer to be used as a part of the string used to create the QR code. The AuthenticatorIssuer seems to be the full name of your B2C instance (not the domain name, the full name). In my case this was a pretty long name and I imagine was creating a string that when used to create the QR code was too long. I changed the AuthenticatorIssuer to be something static and shorter and the QR code started working.

If would probably be a good idea to update the documentation about this issue. Or update the sample to AuthenticatorIssuer to a know functional length.

Andrew Wiebe
  • 111
  • 13