Skip to content

Commit

Permalink
📝 Docs updated
Browse files Browse the repository at this point in the history
  • Loading branch information
naelob committed May 26, 2024
1 parent 905903e commit 1bdeddf
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 18 deletions.
4 changes: 3 additions & 1 deletion docs/core-concepts/magic-links.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

<Steps>

<Step>Login to your [account dashboard](https://dashboard.panora.dev)</Step>
Expand All @@ -38,4 +41,3 @@ icon: "wand-magic-sparkles"
</Steps>

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.
1 change: 1 addition & 0 deletions docs/core-concepts/sync-strategies.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion docs/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

<Steps titleSize="h3">
<Step title="No Code: Magic links">
Let's send our first magic link so you can ask your customers to grant you access to their tools, without writing code.
Expand Down Expand Up @@ -112,7 +115,6 @@ Choose the one that fits your needs !
</Steps>

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**

Expand Down
9 changes: 7 additions & 2 deletions docs/recipes/add-custom-provider-creds.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

<Note>
Before getting started, make sure you've created a custom oAuth application
inside your sofwtare's developer account.{" "}
</Note>

## 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.

<Frame type="glass">
Expand Down
30 changes: 18 additions & 12 deletions docs/recipes/import-existing-users.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

<CodeGroup>
```shell Import a single existing user
Expand All @@ -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 <MY_API_KEY>' \
--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 <MY_API_KEY>' \
--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",
}'
```
</CodeGroup>

# How to fetch linked users
Expand All @@ -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`.

<CodeGroup>
```shell linkedUserFromRemoteId
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }),
Expand Down

0 comments on commit 1bdeddf

Please sign in to comment.