chore: Make createAuthLink mutation more generic

This commit is contained in:
Faruk AYDIN
2021-10-24 20:06:16 +02:00
committed by Ali BARIN
parent 81d5e6d17c
commit 8e91f1f7ed
6 changed files with 19 additions and 13 deletions

View File

@@ -23,7 +23,13 @@ export default class Twitter {
const appFields = this.appData.fields.find((field: Field) => field.key == 'oAuthRedirectUrl')
const callbackUrl = appFields.value;
return this.client.generateAuthLink(callbackUrl);
const authLink = await this.client.generateAuthLink(callbackUrl);
return {
url: authLink.url,
accessToken: authLink.oauth_token,
accessSecret: authLink.oauth_token_secret,
}
}
async verifyCredentials() {