Skip to content
Snippets Groups Projects
Commit c683a417 authored by Guilherme Gazzo's avatar Guilherme Gazzo
Browse files

regression: properly overwrite `OAuth._retrievePendingCredential`

parent 86713bbf
No related branches found
No related tags found
No related merge requests found
......@@ -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,
});
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment