Recommended: JavaScript SDK with React Hooks
For new React apps, we recommend the JavaScript SDK with React Hooks (
@dynamic-labs-sdk/react-hooks) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the React quickstart (JavaScript SDK) to get started.Using your UI
You can use theuseDynamicScopes hook to check for user scopes returned in the JWT.
React
Customize the copy and button
You can customize the copy through props by updating theaccessDeniedMessagePrimary and accessDeniedMessageSecondary.
React
accessDeniedButton prop. Here’s an example to link to a contact page:
React
React