From 1bdeddfd46b6d64e0cf319c9dc6930d624a4c2a4 Mon Sep 17 00:00:00 2001 From: nael Date: Sun, 26 May 2024 16:51:55 +0200 Subject: [PATCH] :memo: Docs updated --- docs/core-concepts/magic-links.mdx | 4 ++- docs/core-concepts/sync-strategies.mdx | 1 + docs/quick-start.mdx | 4 ++- docs/recipes/add-custom-provider-creds.mdx | 9 +++++-- docs/recipes/import-existing-users.mdx | 30 +++++++++++++--------- packages/api/src/app.module.ts | 4 +-- 6 files changed, 34 insertions(+), 18 deletions(-) diff --git a/docs/core-concepts/magic-links.mdx b/docs/core-concepts/magic-links.mdx index 4aff89193..098eec31b 100644 --- a/docs/core-concepts/magic-links.mdx +++ b/docs/core-concepts/magic-links.mdx @@ -14,6 +14,9 @@ icon: "wand-magic-sparkles" ## Send your first Magic Link +[We recommend listening to webhooks to get notified once a user connects and catch the connection token used for requests. +](/recipes/catch-connection-token) + Login to your [account dashboard](https://dashboard.panora.dev) @@ -38,4 +41,3 @@ icon: "wand-magic-sparkles" Once the user successfully completes the granting auth flow, the connection will have a `status` value of `valid`. -We recommend listening to [webhooks](/webhooks/overview) to get notified once a user connects and catch the connection token used for requests. diff --git a/docs/core-concepts/sync-strategies.mdx b/docs/core-concepts/sync-strategies.mdx index 2b7e8443c..f1cb1c2d9 100644 --- a/docs/core-concepts/sync-strategies.mdx +++ b/docs/core-concepts/sync-strategies.mdx @@ -5,6 +5,7 @@ icon: "rotate" --- ## Periodic Sync +Unfortunately, webhooks aren’t always available. Many Third Party applications don’t support real time events. But rest assured, Panora has you covered! With our robust polling technology, our servers will automatically check for new records created/updated and proxy those changes to your application in near real-time. ## Real Time Webhooks diff --git a/docs/quick-start.mdx b/docs/quick-start.mdx index 847b39790..93df37f09 100644 --- a/docs/quick-start.mdx +++ b/docs/quick-start.mdx @@ -17,6 +17,9 @@ Before you begin, make sure you have the following: You either have the option to use a [**no-code magic link**](/core-concepts/magic-links) or the [**embedded frontend snippet**](/recipes/embed-catalog) to get access to your user's data. Choose the one that fits your needs ! +[We recommend listening to webhooks to get notified once a user connects and catch the connection token used for requests. +](/recipes/catch-connection-token) + Let's send our first magic link so you can ask your customers to grant you access to their tools, without writing code. @@ -112,7 +115,6 @@ Choose the one that fits your needs ! Once the user successfully completes the granting auth flow, the connection will have a `status` value of `valid`. -We recommend listening to [webhooks](/webhooks/overview) to get notified once a user connects and catch the connection token used for requests. ## **Step 2: Send your first unified API requests** diff --git a/docs/recipes/add-custom-provider-creds.mdx b/docs/recipes/add-custom-provider-creds.mdx index 7409f8a45..02284ee4f 100644 --- a/docs/recipes/add-custom-provider-creds.mdx +++ b/docs/recipes/add-custom-provider-creds.mdx @@ -4,13 +4,18 @@ description: "By default, all connectors use Panora's managed developer applicat icon: "gear-code" --- +## How it Works +By default, when an end user authenticates any Third Party that uses OAuth via Panora they see a prompt saying "Panora is requesting access to..." + +With Custom OAuth, you can supply your own Client Id and Client Secret and Panora will use those credentials to make the appropriate requests on your behalf. The result of this is that when an end user authenticates, they see "Your [App Name] is requesting access...". + +## How to add custom credentials for a connector + Before getting started, make sure you've created a custom oAuth application inside your sofwtare's developer account.{" "} -## How to add custom credentials for a connector ? - Visit the _Manage Connectors_ [section](https://dashboard.panora.dev/configuration), choose the connector you wish to add credentials for and add your own credentials. diff --git a/docs/recipes/import-existing-users.mdx b/docs/recipes/import-existing-users.mdx index c949b1d9a..36f815d64 100644 --- a/docs/recipes/import-existing-users.mdx +++ b/docs/recipes/import-existing-users.mdx @@ -4,6 +4,11 @@ description: "" icon: "users" --- + +Typically, we recommend creating a Panora linked user each time a new user is created in your application. +We also recommend to import all existing users from your application within Panora. +Without doing that, you can't integrate with Panora. + ## Using the UI #### You can add a single linked user @@ -29,6 +34,7 @@ icon: "users" ## Using our API This code adds a single/batch of linked accounts inside Panora. It helps us have an exact mapping of your existing users inside our system. +These endpoint return [Linked Account object(s)](/glossary/linked-account-object). Depending on how you architect your system, you might want to store this object's identifier (`id_linked_user`) for later use in your database. ```shell Import a single existing user @@ -42,17 +48,17 @@ This code adds a single/batch of linked accounts inside Panora. It helps us have "id_project": "ikloqqkq90-djsddhjs-prs12dj", }' ``` - ```shell Import a batch of existing users - curl --request POST \ - --url https://api.panora.dev/linked-users/batch \ - --header 'Authorization: Bearer ' \ - --header 'Content-Type: application/json' \ - --data '{ - "linked_user_origin_ids": ["acme_user_1", "acme_user_2", "acme_user_3"], # array of remote ids (ids representing your existing users inside your system) - "alias": "acme", # your company name - "id_project": "ikloqqkq90-djsddhjs-prs12dj", - }' - ``` + ```shell Import a batch of existing users + curl --request POST \ + --url https://api.panora.dev/linked-users/batch \ + --header 'Authorization: Bearer ' \ + --header 'Content-Type: application/json' \ + --data '{ + "linked_user_origin_ids": ["acme_user_1", "acme_user_2", "acme_user_3"], # array of remote ids (ids representing your existing users inside your system) + "alias": "acme", # your company name + "id_project": "ikloqqkq90-djsddhjs-prs12dj", + }' + ``` # How to fetch linked users @@ -64,7 +70,7 @@ You must know how to fetch linked users as [you'll have to use them in the UI wi At any point in your code, if you have successfully added your linked users (see above) you'll be able to fetch them by calling : - `linkedUserFromRemoteId(remote_id: string)` where `remote_id` is the id of the user inside your system and this function returns a [LinkedUser object](/glossary/linked-account-object). -- `fetchLinkedUsers()` where this function returns an array of [LinkedUser objects](/glossary/linked-account-object) for your projectId. +- `fetchLinkedUsers()` where this function returns an array of [LinkedUser objects](/glossary/linked-account-object) for your `projectId`. ```shell linkedUserFromRemoteId diff --git a/packages/api/src/app.module.ts b/packages/api/src/app.module.ts index e036f60c1..41494dcfc 100644 --- a/packages/api/src/app.module.ts +++ b/packages/api/src/app.module.ts @@ -31,8 +31,8 @@ import { ThrottlerGuard, ThrottlerModule } from '@nestjs/throttler'; TicketingModule, ThrottlerModule.forRoot([ { - ttl: parseInt(process.env.THROTTLER_TTL), - limit: parseInt(process.env.THROTTLER_LIMIT), + ttl: 60000, + limit: 100, }, ]), ConfigModule.forRoot({ isGlobal: true }),