Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): add support for seeding always_issue_refresh_token option #106

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
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
9 changes: 6 additions & 3 deletions packages/cli/src/commands/database/ogcio/applications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@ const fillApplications = (
secret: inputApp.secret,
description: inputApp.description,
type: inputApp.type,
oidc_client_metadata: `{"redirectUris": ${createArrayString(inputApp.redirect_uri)}, "postLogoutRedirectUris": ${createArrayString(inputApp.logout_redirect_uri)}}`,
custom_client_metadata:
'{"idTokenTtl": 3600, "corsAllowedOrigins": [], "rotateRefreshToken": true, "refreshTokenTtlInDays": 14, "alwaysIssueRefreshToken": false}',
oidc_client_metadata: `{"redirectUris": ${createArrayString(
inputApp.redirect_uri
)}, "postLogoutRedirectUris": ${createArrayString(inputApp.logout_redirect_uri)}}`,
custom_client_metadata: `{"idTokenTtl": 3600, "corsAllowedOrigins": [], "rotateRefreshToken": true, "refreshTokenTtlInDays": 14, "alwaysIssueRefreshToken": ${
inputApp.always_issue_refresh_token ?? false
}}`,
is_third_party: inputApp.is_third_party ?? false,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@
"logout_redirect_uri": "http://localhost:8055",
"secret": "analytics_app_local_secret",
"id": "kgz1zomlw27cxx4pxh5gi",
"is_third_party": false
"is_third_party": false,
"always_issue_refresh_token": true
},
{
"name": "Home Building Block",
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/commands/database/ogcio/ogcio-seeder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export type ApplicationSeeder = {
logout_redirect_uri: string | string[];
secret: string;
is_third_party?: boolean;
always_issue_refresh_token?: boolean;
};

export type ResourceSeeder = {
Expand Down