Skip to content

Commit

Permalink
📄 Update npm packages
Browse files Browse the repository at this point in the history
  • Loading branch information
naelob committed May 2, 2024
1 parent 4c9ac6c commit 2757372
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/angry-items-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@panora/shared": patch
---

Patch
6 changes: 6 additions & 0 deletions .changeset/sharp-taxis-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@panora/embedded-card-react": patch
"@panora/shared": patch
---

patch fix
4 changes: 2 additions & 2 deletions apps/embedded-catalog/react/src/hooks/useOAuth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { constructAuthUrl } from '@panora/shared';
type UseOAuthProps = {
clientId?: string;
providerName: string; // Name of the OAuth provider
vertical: string;
vertical: string; // Vertical (Crm, Ticketing, etc)
returnUrl: string; // Return URL after OAuth flow
projectId: string; // Project ID
linkedUserId: string; // Linked User ID
optionalApiUrl?: string; // URL of the User's Server
optionalApiUrl?: string; // URL of the User's Server
onSuccess: () => void;
};

Expand Down
3 changes: 0 additions & 3 deletions packages/shared/src/authUrl.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { OAuth2AuthData, providerToType } from './envConfig';
import { AuthStrategy, providersConfig, ProviderConfig } from './utils';

interface AuthParams {
projectId: string;
linkedUserId: string;
Expand All @@ -25,10 +24,8 @@ const randomString = () => {
export const constructAuthUrl = async ({ projectId, linkedUserId, providerName, returnUrl, apiUrl, vertical }: AuthParams) => {
const encodedRedirectUrl = encodeURIComponent(`${apiUrl}/connections/oauth/callback`);
const state = encodeURIComponent(JSON.stringify({ projectId, linkedUserId, providerName, vertical, returnUrl }));

// console.log('State : ', JSON.stringify({ projectId, linkedUserId, providerName, vertical, returnUrl }));
// console.log('encodedRedirect URL : ', encodedRedirectUrl);

// const vertical = findProviderVertical(providerName);
if (vertical == null) {
throw new Error('vertical is null');
Expand Down

0 comments on commit 2757372

Please sign in to comment.