Can we embed the login popip into the same page

Billingi, Prabhakar 41 Reputation points
2020-08-10T07:45:35.87+00:00

Using implicit flow login popup opening in new window. Can we embed in same page.

or

Can we stop navigating to the parent window, when login popup is opened.

Any other way to achieve this using iFrame or anything.

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

Accepted answer
  1. Alfredo Revilla - Upwork Top Talent | IAM SWE SWA 27,526 Reputation points Moderator
    2020-08-12T22:29:57.05+00:00

    Try it: https://jsfiddle.net/alfredorevilla/fy1r9xup/5/

    --
    Please let us know if this answer was helpful to you. If so, please remember to mark it as the answer so that others in the community with similar questions can more easily find a solution.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. soumi-MSFT 11,831 Reputation points Microsoft Employee Moderator
    2020-08-10T10:36:29.137+00:00

    @Billingi, Prabhakar , There are two available methods for authentication with redirect flows, namely:

    1. loginRedirect - if using this method, you will need to explicitly register a callback through the handleRedirectCallback() method. This is needed since redirect flows do not return promises as the popup methods do.
    2. loginPopup - The popup methods (loginPopup, acquireTokenPopup) return promises, so you can use the promise pattern (.then and .catch) to handle them.

    For your case, I guess you can try using the loginRedirect method. Since I am not aware of how your code looks like, hence sharing the following link, which I believe might give you some more insight on the implementation.

    https://stackoverflow.com/questions/46417709/how-to-use-loginredirect-instead-of-loginpopup

    Hope this helps.

    Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as Answer; if the above response helped in answering your query.


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.