0

I am trying to use AWS Amplify as the base for an Outlook Add-In. I have been hopping through a handful of issues to date. Currently I am having issues with Amplify Auth rendering correctly within the add-in.

The following Code:

 return (
        <div className='ms-welcome'>
            <button onClick={() => Auth.federatedSignIn()}>Sign In</button>
            <button onClick={checkUser}>Check User</button>
            <button onClick={signOut}>Sign Out</button>
        </div>
        );

Produces this error:

Load denied by X-Frame-Options: https://MY-DOMAIN.auth.us-east-1.amazoncognito.com/login?redi…WLot2C6lAkfPJgsxEsoMTUf_nPTODfKG4&code_challenge_method=S256 does not permit framing.

Is there any way for me to load the Login screen as a Pop Up? I am not sure if what I am trying to do is possible.

Thanks for all the help!

rocketlobster
  • 690
  • 7
  • 18

1 Answers1

0

The recommended approach for pop-ups or similar windows is to use the Dialog API: https://learn.microsoft.com/en-us/office/dev/add-ins/develop/dialog-api-in-office-add-ins. You may also find the office-js-helpers library helpful for your authentication scenario.

Eric Legault
  • 5,706
  • 2
  • 22
  • 38
  • I have posted another question about my issues with both of those suggestions: https://stackoverflow.com/questions/57581770/blank-auth-dialog-window-in-outlook-react-addin – rocketlobster Aug 20 '19 at 21:31