refactor(web): use oauth client instead of app auth client
This commit is contained in:
@@ -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',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user