refactor(web): use oauth client instead of app auth client

This commit is contained in:
Ali BARIN
2024-12-19 14:53:47 +00:00
parent 8c4b67e147
commit 8d5287d51e
23 changed files with 206 additions and 194 deletions

View File

@@ -31,7 +31,7 @@ function getSteps(auth, hasConnection, useShared) {
}
export default function useAuthenticateApp(payload) {
const { appKey, appAuthClientId, connectionId, useShared = false } = payload;
const { appKey, oauthClientId, connectionId, useShared = false } = payload;
const { data: auth } = useAppAuth(appKey);
const queryClient = useQueryClient();
const { mutateAsync: createConnection } = useCreateConnection(appKey);
@@ -55,7 +55,7 @@ export default function useAuthenticateApp(payload) {
const response = {
key: appKey,
appAuthClientId: appAuthClientId || payload.appAuthClientId,
oauthClientId: oauthClientId || payload.oauthClientId,
connectionId,
fields,
};
@@ -133,7 +133,7 @@ export default function useAuthenticateApp(payload) {
}, [
steps,
appKey,
appAuthClientId,
oauthClientId,
connectionId,
queryClient,
createConnection,
@@ -147,7 +147,7 @@ export default function useAuthenticateApp(payload) {
[
steps,
appKey,
appAuthClientId,
oauthClientId,
connectionId,
queryClient,
createConnection,
@@ -156,7 +156,7 @@ export default function useAuthenticateApp(payload) {
resetConnection,
verifyConnection,
],
'steps, appKey, appAuthClientId, connectionId, queryClient, createConnection, createConnectionAuthUrl, updateConnection, resetConnection, verifyConnection',
'steps, appKey, oauthClientId, connectionId, queryClient, createConnection, createConnectionAuthUrl, updateConnection, resetConnection, verifyConnection',
'',
'useAuthenticate',
);