Giter VIP home page Giter VIP logo

Comments (5)

eirikb avatar eirikb commented on May 22, 2024

Hi
I've found a way to trigger this consistently after the Add-in is setup. And a workaround to bypass the error.

Triggering the error

If I change (or remove) the Redirect URIs in SPA setup in Authentication in the AAD App I can trigger the usual

Sorry, but we’re having trouble signing you in.
AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application

error, as expected.
Now I can close the popup, change the Redirect URIs back to the valid URI and trigger login (signInO365) which should work, but I get the error as described in this issue.

Bypass error

To bypass this I clear cookies (on my domain), not localStorage or sessionStorage, but cookies.
MSAL will create a bunch of non-HttpOnly cookies, and by clearing these the login will work as expected.
There is a bug in the sample, where the Promise from msalInstance.loginRedirect is ignored, this is where I add a catch and do something like this: https://stackoverflow.com/a/179514 .
I tried to find some "clear" method in MSAL, but didn't see anything.

from office-add-in-samples.

davidchesnut avatar davidchesnut commented on May 22, 2024

Hi @inspiraller and @eirikb,

Yes, following @eirikb's repo steps I see this same problem. @inspiraller does clearing the cookies fix the issue for you? I'm checking with the team to see if there's a better solution. Thanks!

from office-add-in-samples.

davidchesnut avatar davidchesnut commented on May 22, 2024

Hi @inspiraller,

I apologize as I missed an important detail in your repo steps. Your steps indicate that you configured a web redirect. You need to use an SPA redirect since this sample is a single-page application. You can configure this from the Redirect URIs links on the Overview page in your App registration on the Azure portal. This will take you to the Platform configurations page where you can Add a platform and then choose Single-page application.

Hope this helps,
David

from office-add-in-samples.

msftbot avatar msftbot commented on May 22, 2024

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

from office-add-in-samples.

msftbot avatar msftbot commented on May 22, 2024

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.

from office-add-in-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.