B2C Embedded sign-in experience

Maximilian Anzinger 1 Reputation point
2021-08-23T14:42:51.287+00:00

Hello,

I followed the guide to setup the embedded sign in experience using b2c and an IFrame (embedded-login).
However, I am not quite sure on how to get the Access token and use it throughout my Application.
So far I got the Iframe to display the SignIn/SignUp Form and the login/signup works flawless.
But after that the iframe redirects to the landing page of the application and my "parent" Page does not receive an ID Token.
(The url of the "parent" Page matches the redirect url of the iframe authorization request)
The src of the IFrame is the authorization request url of my b2c policy.

PS: Viewing the network Tab I can see the issued and valid ID Token in the "confirmed" response (redirect-url/#id_token=eyJ0eX...) from the b2c Policy.

Best
Max

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,952 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. soumi-MSFT 11,786 Reputation points Microsoft Employee
    2021-09-27T08:29:45.63+00:00

    @Maximilian Anzinger , can you try using this B2C EmbeddedSignin MSAL-Node Sample. This sample uses the OIDC flow to authenticate the user, as well as fetch the ID_Token from B2C and display the user details. This sample implements the iframe to load the signup and signin page of B2C.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.