score:2

Accepted answer

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.


Related Query

More Query from same tag