mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 19:28:51 +00:00
Update OauthCallbackPage.tsx
This commit is contained in:
+6
-13
@@ -1,5 +1,3 @@
|
|||||||
import crypto from "crypto";
|
|
||||||
|
|
||||||
import { useCallback, useEffect, useState } from "react";
|
import { useCallback, useEffect, useState } from "react";
|
||||||
import { useNavigate, useSearch } from "@tanstack/react-router";
|
import { useNavigate, useSearch } from "@tanstack/react-router";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
@@ -60,16 +58,9 @@ export const OAuthCallbackPage = () => {
|
|||||||
redirectUri: state.redirectUri
|
redirectUri: state.redirectUri
|
||||||
});
|
});
|
||||||
|
|
||||||
createNotification({
|
|
||||||
text: "Successfully granted Microsoft Teams admin consent",
|
|
||||||
type: "success"
|
|
||||||
});
|
|
||||||
|
|
||||||
navigate({
|
navigate({
|
||||||
to: ROUTE_PATHS.Organization.SettingsPage.path
|
to: ROUTE_PATHS.Organization.SettingsPage.path
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// Ensure that the localstorage is ready for use, to avoid the form data being malformed
|
// Ensure that the localstorage is ready for use, to avoid the form data being malformed
|
||||||
@@ -85,13 +76,15 @@ export const OAuthCallbackPage = () => {
|
|||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
await handleMicrosoftTeams();
|
await handleMicrosoftTeams();
|
||||||
|
|
||||||
|
createNotification({
|
||||||
|
text: "Successfully created Microsoft Teams workflow integration",
|
||||||
|
type: "success"
|
||||||
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
createNotification({
|
createNotification({
|
||||||
text:
|
text: "Failed to create Microsoft Teams workflow integration",
|
||||||
code !== ""
|
|
||||||
? "Failed to create Microsoft Teams workflow integration"
|
|
||||||
: "Failed to grant Microsoft Teams admin consent",
|
|
||||||
type: "error"
|
type: "error"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user