Skip to content

Commit

Permalink
Update generator.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima authored Oct 31, 2024
1 parent c3287b3 commit f1fdec2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion generators/micronaut/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ export default class extends BaseApplicationGenerator {
get [BaseApplicationGenerator.CONFIGURING]() {
return this.asConfiguringTaskGroup({
async configuringTemplateTask() {
if (this.jhipsterConfigWithDefaults.authenticationType === 'oauth2') {
const { authenticationType, rememberMeKey, jwtSecretKey } = this.jhipsterConfigWithDefaults;
if (authenticationType === 'session' && !rememberMeKey) {
this.jhipsterConfig.rememberMeKey = createSecret();
} else if (
jwtSecretKey === undefined &&
(authenticationType === 'jwt' || authenticationType === 'oauth2')
) {
this.jhipsterConfig.jwtSecretKey = this.jhipsterConfig.jwtSecretKey ?? createBase64Secret(64, this.options.reproducibleTests);
}
},
Expand Down

0 comments on commit f1fdec2

Please sign in to comment.