score:2
if i understand you right and you are using the oidc-client-js library to implement open id connect then my nodejs code sample may be useful to you, and the authenticator class in particular.
restoring the pre-redirect location / deep linking
this is managed via code like this, which is also useful if the user has bookmarked a location within your app and needs to login first:
// store the state when redirecting the page
await this._usermanager.signinredirect({
state: location.hash,
});
// restore it afterwards - and remove tokens from the url
const user = await this._usermanager.signinredirectcallback();
history.replacestate({}, document.title, user.state.hash);
reloading the page or opening a new tab
this is best managed via silent token renewal using the authorization server session cookie, so that there is no top level redirect.
await this._usermanager.signinsilent();
running my sample against your system
it may help you to have something to compare against, by running the sample against your own system, by changing the details in the spa and api config files to point to identity server.
Source: stackoverflow.com
Related Query
- Redirect to specific page after refreshing (oidc.js)
- Redirect to a specific page after successful action - Redux saga
- react-redux redirect to other page after login
- How do I test next/link (Nextjs) getting page redirect after onClick in React?
- Bold active menu after refreshing the page
- How do I redirect user to another page after submit the form?
- Using React Router to Redirect to next page after successful login
- ReactJs/NextJS - automatic redirect after 5 seconds to another page
- Reactjs redirect to dashboard page after successful login with react-router-dom (v6)
- Is there an accessible way of telling that some part of UI can redirect to other page if some asynchronous condition is resolved after clicking link?
- how to redirect to home page after submitting redux-form?
- How to redirect user back to initially-requested page after authentication with React-Router v6?
- How do i make a react app redirect to the login page after registration?
- React redux how to redirect to specific page using react-router
- React Router works only after refreshing the page
- How to redirect to completely new page after user click in react?
- React.js: Save items after refreshing page
- How to redirect to another page if user gets to a specific URL in Next.js?
- Hookrouter (react) changes url but not the view, only after refreshing the page by yourself
- I want to redirect to a particular page after getting response from webservice using withRouter in react
- is there any way to stick on the same page even after refreshing in react router?
- Why it gets the correct data from localStorage only after refreshing the page in React
- Warning: Can't perform a React state update on an unmounted component after update context and redirect to another page
- Why react-router does not work in the server? It shows 404 error after refreshing the page
- Redirect to another page after form submit
- React.js: Component updates only after refreshing the page [Post request]
- How to redirect to a new page in react and typescript after an animation
- How to create login and redirect to another page after success?
- How to redirect to a specific page according to a condition in React-Router 4
- How to redirect to log in page after click logout button on navbar header in React?
More Query from same tag
- Critical dependency warning when using react-pdf
- How to use a map() function to show a list of elements in React with Redux Saga
- react material-ui v5 theming doesnt work with storybook
- Could not find "store", even if the root is wrapped in Provider
- Radio buttons with react-hook-form
- What is the best way to add additional input field on a button click?
- Safari not scailng image properly
- How to retrieve a place's address when I know latitude & longitude in React-Leaflet using leaflet-control-geocoder?
- pushing the filtered obj to an empty array in react redux
- Material UI Select button label appearing above component
- I cant seem to seperate the button from the actual function REACT
- Redux form props & typescript
- Cleanup after a async function in useEffect
- Selecting HTML dropdown with ReactJS in VBA
- How to select sibling child in tailwindcss using react
- object - array of object - save in variable in Javascript - React
- Webpack image doesn't load 404
- React & d3 combination prevents mousedown event
- Cannot update during an existing state transition error in React
- NextJS: TailwindCSS not working in production
- React Router Render props is not rendering component when using params
- Pages are merging for Reactjs routing?
- Add a disabled field to a checkbox if a user has checked a certain amount
- How to replace container class in react-bootstrap
- How to get data from the local graph?
- Why dont works this Effect in React JS with context API?
- React with Application Insights
- Why am I getting match is not a function when it is clearly defined?
- React not render Li elements
- How to simulate window.location change with react-testing-library