Merge pull request #147 from nathonius/fix/143/use-custom-oauth

🐛 fix: #143 Use custom oauth setting during token gen for new account
This commit is contained in:
Nathan 2024-08-30 17:35:11 -04:00 committed by GitHub
commit 7aa0c14e01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -103,7 +103,11 @@ export class AccountSettings {
.addButton((button) => {
button.setButtonText("Generate Token");
button.onClick(async () => {
const authResult = await auth(this.tokenVerification.bind(this))({
const clientId = this.newAccount?.customOAuth ? this.newAccount.clientId : undefined;
const authResult = await auth(
this.tokenVerification.bind(this),
clientId,
)({
type: "oauth",
});
this.authModal?.close();