Skip to content

Commit 7497bc5

Browse files
committed
chore: update custom idp readme
1 parent 09b2b17 commit 7497bc5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

custom-idp/6.0.0-alpha/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,21 @@ yarn webiny extension custom-idp/6.0.0-alpha
4242
Once the extension is installed, you need to provide implementation for `goToLogin`, `onError`, `onLogout`, and `getFreshTokens`.
4343
In your project, open `extensions/customIdp/admin/src/index.tsx`. Here you'll find a reference implementation which you need to update with the specifics of your IdP (redirects to specific URLs, error code mapping, etc.). This file is also an entrypoint to the extension, and a place to configure the `<CustomIdp/>` component.
4444

45+
After a successful login on your IdP login page, you need to redirect the user back to the Webiny Admin app and append `idToken`, `refreshToken`, and optionally `tenantId`, in the query params:
46+
47+
```
48+
// Redirect to Webiny after successful authentication
49+
https://admin.your-system.com?idToken={idToken}&refreshToken={refreshToken}&tenantId=12345
50+
```
51+
52+
If you want to go to a specific URL, you can do that as well:
53+
54+
```
55+
// Redirect to a specific route within Webiny admin app
56+
https://admin.your-system.com/website-builder/pages?idToken={idToken}&refreshToken={refreshToken}&tenantId=12345
57+
```
58+
59+
4560
> [!TIP]
4661
> If you need to change how some parts of the `<CustomIdp/>` work, start by opening the `extensions/customIdp/admin/src/CustomIdp.tsx` component, and see how it interacts with Webiny and the external IdP.
4762
@@ -54,3 +69,4 @@ WEBINY_API_IDP_SHARED_SECRET=my_shared_secret
5469
```
5570

5671
You can find the verification logic in `extensions/customIdp/api/src/createAuthenticator.ts`. Here you can also implement additional verification of token claims.
72+

0 commit comments

Comments
 (0)