GithubHelp home page GithubHelp logo

react-aad-implicitflow about sp-dev-fx-webparts HOT 6 CLOSED

pnp avatar pnp commented on August 26, 2024
react-aad-implicitflow

from sp-dev-fx-webparts.

Comments (6)

davidhartman avatar davidhartman commented on August 26, 2024 2

Waldek -

Of course after I post this I figure it out! :) I'm dealing with the infinite loop problem but it's fairly well documented so I should be able to figure it out.

@waldekmastykarz

from sp-dev-fx-webparts.

waldekmastykarz avatar waldekmastykarz commented on August 26, 2024

If you're using ADAL JS with Angular you don't need to call this.authCtx.acquireTokens yourself. Instead you could define the list of endpoints for which ADAL JS should retrieve AAD access token. ADAL JS ships with an HTTP interceptor that automatically monitors all web requests issued using the HTTP service and if the request URL matches one of the registered endpoints, ADAL JS will automatically retrieve the access token for it.

from sp-dev-fx-webparts.

davidhartman avatar davidhartman commented on August 26, 2024

Thanks Waldek for all the help! When I tried doing it the angular way, i.e. setting adal up in the .config function when the app starts. I receive "AuthenticationContext is not defined at Object.AdalModule.provider.init()", which I know is because AuthenticationContext is not in the global namespace because we are using systemjs. However, I'm not sure how to get the AuthenticationContext into the global namespace. Any suggestions?

from sp-dev-fx-webparts.

waldekmastykarz avatar waldekmastykarz commented on August 26, 2024

Looking forward to read more about your solution 🙂

from sp-dev-fx-webparts.

vortex2143 avatar vortex2143 commented on August 26, 2024

I have the same issue, when I try to use the sample without any changes in the code. I installed the webpart on SPO and tried to use it within the workbench. I get on both the same error: token renewal operation failed due to timeout. The error occures when the acquireToken function is called.

from sp-dev-fx-webparts.

davidhartman avatar davidhartman commented on August 26, 2024

I noticed that would sometimes happen if I had developer tools open in Chrome when the acquireToken function was called ...

@vortex2143

from sp-dev-fx-webparts.

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.