I followed this - http://docs.identityserver.io/en/release/quickstarts/7_javascript_client.html.
Using the following configuration, I tried to login Identity Server from my ReactJS app. http://localhost:3000/callback.html is loaded after successful login. I got id_token and access_token in the url. But, I am sure this callback.html is not the 'src\callback.html' which I have in the folder structure. Even if I delete the 'src\callback.html' file, http://localhost:3000/callback.html#id_token=....... is still loaded. May I know how to change the redirect_uri to a view in my React app (for example Home.js rather than an html file)? I hope I should use route for this. Please advise.
var config = {
authority: "http://localhost:5000",
client_id: "reactSpa",
redirect_uri: "http://localhost:3000/callback.html", // I want it to be something like 'http://localhost:3000/components/home' (a view not an html)
response_type: "id_token token",
scope: "openid profile api1",
post_logout_redirect_uri: "http://localhost:3000/index.html", // same here
};
PS:
I need to set the redirect_uri and post_logout_redirect_uri to any of the views in my React app (not html files) so that I can do the following operation in my Callback view.
new Oidc.UserManager().signinRedirectCallback().then(function () {
window.location = "index.html"; // should be just 'index'
}).catch(function (e) {
console.error(e);
});