Closed 2P2-Anthony closed 6 years ago
I'm having the same problem. So i put the authentication in an Iframe having the code below and when i first login or delete localstorage then try to access my app, login, the iframe does not get the token. Can somebody help me?
@mirahManlapig You should first call login and then call acquireToken. The library expects a signed in user first before you can call acquireToken for any resource. This is by design.
@mirahManlapig Closing this issue due to lack of response. Please reopen if it is not resolved for you.
We have an SPFx web part working pretty well, but even if the user is already logged into Office 365 when they hit the page containing the SPFx web part - the getCachedUser object is always null. This forces a redirect for login, which auto-redirects back to our application page immediately.
Our original PoC with straight JavaScript never did this, but the SPFx web part always redirects on first hit.
Has anyone seen and fixed this behaviour? What should we be looking for in our Authentication wrapper?
https://stackoverflow.com/questions/50146519/adal-spfx-getcacheduser-is-always-null