Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion backend/LexData/SeedingData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,33 @@ async ValueTask UpdateApp(object dbApp, OpenIddictApplicationDescriptor seedApp,
new Uri("http://localhost"),//handles system web view case
new Uri("msalbecf2856-0690-434b-b192-a4032b72067f://auth")//handles android web view callback
}
}
},
new OpenIddictApplicationDescriptor
{
ClientId = "the-combine",
ClientType = OpenIddictConstants.ClientTypes.Public,
ApplicationType = OpenIddictConstants.ApplicationTypes.Native, //native allows the redirect port to be dynamic
DisplayName = "The Combine",
//explicit requires the user to consent, Implicit does not, External requires an admin to approve, not currently supported
ConsentType = OpenIddictConstants.ConsentTypes.Explicit,
Permissions =
{
OpenIddictConstants.Permissions.Endpoints.Authorization,
OpenIddictConstants.Permissions.Endpoints.Token,
OpenIddictConstants.Permissions.GrantTypes.AuthorizationCode,
OpenIddictConstants.Permissions.ResponseTypes.Code,
OpenIddictConstants.Permissions.Scopes.Email,
OpenIddictConstants.Permissions.Scopes.Profile,
OpenIddictConstants.Permissions.Prefixes.Scope + LexboxAuthScope.SendAndReceive.ToString().ToLower()
},
RedirectUris = {
new Uri("http://localhost:5000/v1/auth/oauth-callback"), // dev with npm start
new Uri("https://thecombine.localhost/v1/auth/oauth-callback"), // dev with Docker
new Uri("https://thecombine.localhost:5000/v1/auth/oauth-callback"), // dev with Rancher
new Uri("https://qa-kube.thecombine.app/v1/auth/oauth-callback"), // QA environment
new Uri("https://thecombine.app/v1/auth/oauth-callback") // Production environment
}
},
], a => a.ClientId ?? throw new InvalidOperationException("ClientId is null"));

private IEnumerable<OpenIddictApplicationDescriptor> DevApps => [
Expand Down
Loading