Skip to content

Commit 28effe5

Browse files
author
Alexis
committed
Create docs for self-serve portal links for nextjs-sdk
1 parent 9085abf commit 28effe5

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

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

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,6 +1606,54 @@ 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 kinde portal, you can use the `PortalLink` component.
1612+
1613+
```jsx
1614+
import {PortalLink} from "@kinde-oss/kinde-auth-nextjs/components";
1615+
1616+
<PortalLink></PortalLink>
1617+
```
1618+
1619+
### children
1620+
1621+
When setting up your portal link, `children=""` must be set, as that will be what your link is called.
1622+
1623+
1624+
```jsx
1625+
import {PortalLink} from "@kinde-oss/kinde-auth-nextjs/components";
1626+
1627+
<PortalLink children="Portal Link Name"></PortalLink>
1628+
```
1629+
### subNav
1630+
1631+
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.
1632+
1633+
```jsx
1634+
import {PortalLink} from "@kinde-oss/kinde-auth-nextjs/components";
1635+
/**
1636+
* Valid subNav values are:
1637+
* profile
1638+
* organization_details
1639+
* organization_payment_details
1640+
* organization_plan_selection
1641+
* payment_details
1642+
* plan_details
1643+
* plan_selection
1644+
*/
1645+
<PortalLink subNav="organization_payment_details"></PortalLink>
1646+
```
1647+
1648+
### returnUrl
1649+
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.
1650+
1651+
```jsx
1652+
import {PortalLink} from "@kinde-oss/kinde-auth-nextjs/components";
1653+
1654+
<PortalLink returnUrl="http://yourdomain.example"></PortalLink>
1655+
```
1656+
16091657
## Analytics
16101658

16111659
### UTM tags

0 commit comments

Comments
 (0)