refactor: Use generateAuthUrl method instead of createAuthData

This commit is contained in:
Faruk AYDIN
2022-11-10 18:50:36 +01:00
parent 10e2794ff9
commit 81c41ef5ee
21 changed files with 42 additions and 50 deletions

View File

@@ -2,7 +2,7 @@ import { IField, IGlobalVariable } from '@automatisch/types';
import { URLSearchParams } from 'url';
import scopes from '../common/scopes';
export default async function createAuthData($: IGlobalVariable) {
export default async function generateAuthUrl($: IGlobalVariable) {
const oauthRedirectUrlField = $.app.auth.fields.find(
(field: IField) => field.key == 'oAuthRedirectUrl'
);

View File

@@ -1,9 +1,8 @@
import createAuthData from './create-auth-data';
import generateAuthUrl from './generate-auth-url';
import verifyCredentials from './verify-credentials';
import isStillVerified from './is-still-verified';
export default {
generateAuthUrl: true,
fields: [
{
key: 'oAuthRedirectUrl',
@@ -56,7 +55,7 @@ export default {
},
],
createAuthData,
generateAuthUrl,
verifyCredentials,
isStillVerified,
};