Skip to content

Commit

Permalink
not sure if
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Oct 22, 2024
1 parent 7c30e20 commit b8cdc71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/meteor/app/2fa/server/loginHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ const recreateError = (errorDoc: Error | Meteor.Error): Error | Meteor.Error =>
return copyTo(errorDoc, error);
};

OAuth._retrievePendingCredential = function (key, ...args): string | Error | void {
OAuth._retrievePendingCredential = async function (key, ...args): Promise<string | Error | void> {
const credentialSecret = args.length > 0 && args[0] !== undefined ? args[0] : undefined;
check(key, String);

const pendingCredential = OAuth._pendingCredentials.findOne({
const pendingCredential = await OAuth._pendingCredentials.findOneAsync({
key,
credentialSecret,
});
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/definition/externals/meteor/oauth.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ declare module 'meteor/oauth' {
}

namespace OAuth {
function _retrievePendingCredential(key: string, ...args: string[]): void;
function _retrievePendingCredential(key: string, ...args: string[]): Promise<string | Error | void>;
function openSecret(secret: string): string;
function retrieveCredential(credentialToken: string, credentialSecret: string);
function _retrieveCredentialSecret(credentialToken: string): string | null;
Expand Down

0 comments on commit b8cdc71

Please sign in to comment.