Skip to content

Commit 0daf6ee

Browse files
Merge pull request #484 from pesickaa/nextjs-add-self-serve-portal-link
Create docs for self-serve portal links for nextjs-sdk
2 parents 4840f07 + 50306ef commit 0daf6ee

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/content/docs/developer-tools/sdks/backend/nextjs-sdk.mdx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,6 +1606,38 @@ import {LoginLink, RegisterLink} from "@kinde-oss/kinde-auth-nextjs/components";
16061606

16071607
If the `orgCode` is not specified and the user belongs to multiple organizations, they will be prompted to choose which organization to sign in to during the login or register flow.
16081608

1609+
## Self Serve Portal
1610+
1611+
To allow your users to be sent to the self-serve portal, you can use the `PortalLink` component.
1612+
Check here for information on enabling [self-serve portal for Organizations](https://docs.kinde.com/build/set-up-options/self-serve-portal-for-orgs/).
1613+
Check here for information on enabling [self-serve portal for users](https://docs.kinde.com/build/set-up-options/self-serve-portal-for-users/).
1614+
To use our self-serve portal API please see [Get self-serve portal link](https://docs.kinde.com/kinde-apis/frontend/).
1615+
1616+
```jsx
1617+
import {PortalLink} from "@kinde-oss/kinde-auth-nextjs/components";
1618+
1619+
<PortalLink>Portal Link Name</PortalLink>
1620+
```
1621+
### subNav
1622+
1623+
The `subNav=""` property allows you to set the area of the portal you want the user to land on. By default, it will send users to their profile.
1624+
1625+
```jsx
1626+
import {PortalLink} from "@kinde-oss/kinde-auth-nextjs/components";
1627+
import { PortalPage } from "@kinde/js-utils";
1628+
1629+
<PortalLink subNav={PortalPage.organizationPaymentDetails}></PortalLink>
1630+
```
1631+
1632+
### returnUrl
1633+
The `returnUrl` property is the URL to redirect the user to after they have completed their actions in the portal. The url must be an absolute url to work correctly.
1634+
1635+
```jsx
1636+
import {PortalLink} from "@kinde-oss/kinde-auth-nextjs/components";
1637+
1638+
<PortalLink returnUrl="http://yourdomain.example"></PortalLink>
1639+
```
1640+
16091641
## Analytics
16101642

16111643
### UTM tags

0 commit comments

Comments
 (0)