Skip to content

Commit

Permalink
[oidc-gen] don't ask for a client-secret if pub client is used
Browse files Browse the repository at this point in the history
  • Loading branch information
zachmann committed Dec 19, 2023
1 parent 2201c89 commit e48e48c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/oidc-gen/gen_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ struct oidc_account* manual_genNewAccount(
if (arguments->issuer != NULL) {
secFreeList(iss_l);
if (foundArgIss) {
account_setIssuerUrl(account, oidc_strcopy(arguments->issuer));
readIssuer(account, arguments);
} else if (only_preferred) {
if (on_mytoken_preferred_but_fails_return &&
*on_mytoken_preferred_but_fails_return) {
Expand Down Expand Up @@ -593,9 +593,14 @@ struct oidc_account* manual_genNewAccount(
return account;
}
oidc:
account_setMytokenUrl(account, NULL);
needIssuer(account, arguments);
needClientId(account, arguments);
askOrNeedClientSecret(account, arguments, arguments->usePublicClient);
if (arguments->usePublicClient) {
readClientSecret(account, arguments);
} else {
askOrNeedClientSecret(account, arguments, arguments->usePublicClient);
}
needScope(account, arguments);
readAudience(account, arguments);
readRefreshToken(account, arguments);
Expand Down

0 comments on commit e48e48c

Please sign in to comment.