Update OpenIddictDataSeedContributor

pull/13035/head
liangshiwei 3 years ago
parent 8b8364b8a3
commit 4db6fe874e

@ -106,7 +106,7 @@ public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDep
var consoleAndAngularClientId = configurationSection["MyProjectName_App:ClientId"];
if (!consoleAndAngularClientId.IsNullOrWhiteSpace())
{
var webClientRootUrl = configurationSection["MyProjectName_App:RootUrl"]?.TrimEnd('/');
var consoleAndAngularClientRootUrl = configurationSection["MyProjectName_App:RootUrl"]?.TrimEnd('/');
await CreateApplicationAsync(
name: consoleAndAngularClientId,
type: OpenIddictConstants.ClientTypes.Public,
@ -121,8 +121,8 @@ public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDep
OpenIddictConstants.GrantTypes.RefreshToken
},
scopes: commonScopes,
redirectUri: webClientRootUrl,
postLogoutRedirectUri: webClientRootUrl
redirectUri: consoleAndAngularClientRootUrl,
postLogoutRedirectUri: consoleAndAngularClientRootUrl
);
}

@ -106,7 +106,7 @@ public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDep
var consoleAndAngularClientId = configurationSection["MyProjectName_App:ClientId"];
if (!consoleAndAngularClientId.IsNullOrWhiteSpace())
{
var webClientRootUrl = configurationSection["MyProjectName_App:RootUrl"]?.TrimEnd('/');
var consoleAndAngularClientRootUrl = configurationSection["MyProjectName_App:RootUrl"]?.TrimEnd('/');
await CreateApplicationAsync(
name: consoleAndAngularClientId,
type: OpenIddictConstants.ClientTypes.Public,
@ -121,8 +121,8 @@ public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDep
OpenIddictConstants.GrantTypes.RefreshToken
},
scopes: commonScopes,
redirectUri: webClientRootUrl,
postLogoutRedirectUri: webClientRootUrl
redirectUri: consoleAndAngularClientRootUrl,
postLogoutRedirectUri: consoleAndAngularClientRootUrl
);
}

Loading…
Cancel
Save