Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import LlamaIndexJSSample from "/snippets/how-tos/google-calendar/llamaindex.mdx
import LlamaIndexSample from "/snippets/how-tos/google-calendar/llamaindex-python.mdx";
import NextJSAuth0Sample from "/snippets/how-tos/google-calendar/nextjs-auth0.mdx";
import GenKitSample from "/snippets/how-tos/google-calendar/genkit.mdx";
import AccountLinking from "/snippets/how-tos/account-linking.mdx";
import { AccountLinking } from "/snippets/how-tos/account-linking.jsx";

import { GoogleCalendarPrereqs } from "/snippets/how-tos/google-calendar/prereqs.jsx";
import { CustomApiClient } from "/snippets/common/custom-api-client.jsx";
Expand Down
3 changes: 3 additions & 0 deletions auth4genai/how-tos/get-salesforce-opportunities.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ mode: "wide"

import { SalesforcePrereqs } from "/snippets/how-tos/salesforce/prereqs.jsx";
import { CustomApiClient } from "/snippets/common/custom-api-client.jsx";
import { AccountLinking } from "/snippets/how-tos/account-linking.jsx";

<Tabs>
<Tab title="Next.js" icon="https://mintlify-assets.b-cdn.net/auth0/nextjs-svgrepo-com.svg">
Expand Down Expand Up @@ -140,3 +141,5 @@ Coming soon!
</Tab>

</Tabs>

<AccountLinking connectionLabel="Salesforce" />
2 changes: 1 addition & 1 deletion auth4genai/how-tos/list-github-repositories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import LlamaIndexSample from "/snippets/how-tos/github/llamaindex-python.mdx";
import NextJSAuth0Sample from "/snippets/how-tos/github/nextjs-auth0.mdx";
import GenKitSample from "/snippets/how-tos/github/genkit.mdx";
import LlamaIndexJSSample from "/snippets/how-tos/github/llamaindex.mdx";
import AccountLinking from "/snippets/how-tos/account-linking.mdx";
import { AccountLinking } from "/snippets/how-tos/account-linking.jsx";

import { GitHubPrereqs } from "/snippets/how-tos/github/prereqs.jsx";
import { CustomApiClient } from "/snippets/common/custom-api-client.jsx";
Expand Down
2 changes: 1 addition & 1 deletion auth4genai/how-tos/list-slack-channels.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import LangGraphSample from "/snippets/how-tos/slack/langgraph-python.mdx";
import LlamaIndexSample from "/snippets/how-tos/slack/llamaindex-python.mdx";
import GenKitSample from "/snippets/how-tos/slack/genkit.mdx";
import LlamaIndexJSSample from "/snippets/how-tos/slack/llamaindex.mdx";
import AccountLinking from "/snippets/how-tos/account-linking.mdx";
import { AccountLinking } from "/snippets/how-tos/account-linking.jsx";

import { SlackPrereqs } from "/snippets/how-tos/slack/prereqs.jsx";
import { CustomApiClient } from "/snippets/common/custom-api-client.jsx";
Expand Down
41 changes: 41 additions & 0 deletions auth4genai/snippets/how-tos/account-linking.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
export const AccountLinking = ({ connectionLabel = "any Identity Provider" }) => (
<>
<h2>Account Linking</h2>
<p>
If you're integrating with {connectionLabel} and want users to be able to sign in using a different
method (e.g., username and password or another external provider), you need to link
these identities into a single user account. Auth0 refers to this process as{" "}
<a href="https://auth0.com/docs/manage-users/user-accounts/user-account-linking">
Account Linking
</a>
.
</p>
<p>
Account Linking is separate from{" "}
<a href="https://auth0.com/docs/secure/tokens/token-vault/connected-accounts-for-token-vault">
Connected Accounts for Token Vault
</a>
:
</p>
<ul>
<li>Account Linking merges multiple Auth0 identities into one user profile for sign-in.</li>
<li>
Connected Accounts for Token Vault allows that signed-in user to authorize an external
provider so Auth0 can store the provider's tokens in Token Vault.
</li>
</ul>
<p>
If your application uses{" "}
<a href="https://auth0.com/docs/manage-users/organizations">Organizations</a>, authenticate the
user with the target organization before initiating the Connected Accounts flow. Organizations
define the session context; they do not create a shared external account for the organization.
</p>
<p>
Account Linking logic and handling varies depending on your app or agent.
You can find an example of how to implement it in a{" "} <a href="https://github.com/auth0-lab/market0/blob/main/app/api/auth/%5Bauth0%5D/route.ts#L43">Next.js chatbot app</a>
. If you have questions or are looking for best practices,{" "}
<a href="http://discord.gg/XbQpZSF2Ys">join our Discord</a> and ask in the{" "}
<code>#auth0-for-gen-ai</code> channel.
</p>
</>
);
Loading