score:1
Please double check that the page you use as your redirectUri does not change or clear the hash of the url. The response from AAD is returned in the hash and clearing this can result in this intermittent behavior as it creates a race condition between your application logic and MSAL.
score:1
Set the redirectUri to a blank page or a page that does not implement MSAL. If your application is only using popup and silent APIs you can set this on the PublicClientApplication config like I did below:
export const msalConfig = {
auth: {
clientId: process.env.REACT_APP_CLIENTID,
authority: `https://login.microsoftonline.com/${process.env.REACT_APP_TENANTID}`,
redirectUri: 'http://localhost:3000/blank.html'
},
cache: {
cacheLocation: "localStorage"
}
}
If your application also needs to support redirect APIs you can set the redirectUri on a per request basis:
msalInstance.loginPopup({
redirectUri: "http://localhost:3000/blank.html"
})
Source: stackoverflow.com
Related Query
- Microsoft Authentication React "hash_empty_error" when using loginPopup
- Authentication Error when using mode: no-cors using fetch in React
- window not defined error when using extract-text-webpack-plugin React
- Dealing with an empty array when using .map() in React
- React error when using audio.play() function
- Why do my styled component keyframes error with ts-styled-plugin(9999) in react when using percentage instead of TO/FROM
- Error when using Maps in react native
- react i18next "hooks" error when using t() from useTranslation()
- React TypeScript: TS Error when using useReducer
- Typescript error when using React useContext and useReducer
- Error when passing parameters in components in react using Typescript
- React Type Error when implementing authentication with Python
- Unknown plugin "transform-decorators-legacy" error when using react storybook in windows
- react redux: still getting empty object for this.props when using Connect for mapStateToProps and mapDispatchToProps
- 403 error code when using axios.post to Django endpoint in React app
- Removing Hash from react router when using with Laravel
- When Using Redux Saga with React Get This Error .. Uncaught TypeError: getPosts is not a function
- AWS creds error when making calls from local react app "Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1"
- Syntax Error when using Gulp to compile React in ES6
- React using react-hook-form - rendering output when no data is available - error map undefined
- Error coming when using the state value in react using typescript
- React error "Uncaught Invariant Violation" when using react-router
- S3 creating empty files when uploading a file from React contact form using Axios
- React Authentication - network error when verifying if user is logged in, via token in local storage
- cant add image in react getting an error Error: Cannot find module './undefined' when using require
- How to see actual React error in browser log in ASP.NET MVC application when using Visual Studio
- Type error when using render when defining table columns in material table React
- Error when testing a React Parent that contains a Child React Redux Component using Enzyme Mount
- Getting SCRIPT1028 error on Edge when using react lazy loading
- `require is not defined` error when using electron with a react app
More Query from same tag
- How to use custom functions in a React class after it was rendered?
- H1 tag value not showing when page loads up in React
- How to iterate through a JSON array and display specific information based on an API response value in React?
- NW Js throwing net::ERR_UNKNOWN_URL_SCHEME when accessing files on hd
- emptying the input after submiting a form
- How to deactivate the IOs fullscreen mode for html5 video tag
- ReactJS: can not change style with changing state
- Unable to type in input field React
- The value of useState varies for array
- What does "this" refer to in a React component?
- Setting multiple states in custom hook
- TypeError: Cannot read property 'type' of undefined in react js
- How to pass value from react to lit-element props
- Netlify won't deploy, I am trying to add google tag manager to a gatsby site but having difficulty
- Is there a way to add a badge on marker in react-leaflet?
- React toggling between clickable words that pull up <Elements/>
- Login is not a function after logging out then trying to log back in
- Task :app:bundleReleaseJsAndAssets_SentryUpload_200 FAILED
- Restoring previous state in Redux when going back in history with React-router
- How to retrieve data from firebase in React?
- Test a form with Jest and React JS TestUtils
- Monaco editor - Pre-populate find control with text
- How to render activeClassName style for a react-router-dom NavLink rendered within a material-ui button in a typescript environment?
- react native (expo) load markdown files
- use ! in Reactjs Component in JSX
- Is there a simple idiomatic way of updating key-value states in Redux reducers
- Split Lines function bug - ReactJS
- How to catch custom java8 exception from react?
- how to not set off onclick in some parts of div?
- Transparent background of the images are too big