when we install Sitecore 9.1, identity server is installed and when we install Sitecore Commerce, another Identity server is installed.
Is it possible to have single identity server for both authentication?
As you are upgrading from Sitecore Commerce 9.0 follow the upgrade guide.
The Sitecore Identity server is included as part of the Sitecore Experience Platform (XP) 9.1 deployment. The following instructions assume that you completed Sitecore Identity installation as part of the Sitecore XP upgrade process. You must make the following configuration changes to use the new Sitecore Identity server:
config.jsonfile, set the
SitecoreIdentityServerUrlto point to the URL of the Sitecore Identity service in your Sitecore XP 9.1 deployment. For example, navigate to the
C:\inetpub\wwwroot\<CommerceAuthoring_SC9>\wwwroot \folder, open the
config.jsonfile, expand the
AppSettingsnode, and specify the URL of the Sitecore Identity server: "SitecoreIdentityServerUrl":"https://sxastorefront-identityserver" NOTE The above example uses the default Sitecore Identity server URL. In your deployment, the Sitecore Identity server could have a different name and URL.
C:\inetpub\wwwroot\SitecoreBizFx\assetsfolder, open the config.json file and update the “IdentityServerUri” parameter with the URI of the Sitecore Identity server, for example:
Sitecore.Commerce.IdentityServer.Host.xmlfile into the production configurDtion folder of the new Sitecore Identity server in Internet Information Service (IIS) Manager, (for example: