Skip to content

Commit 791e942

Browse files
authored
chore(clerk-react,vue,astro): Allow hiding of UserProfile API keys page within UserButton (#7201)
1 parent 4011c5e commit 791e942

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

.changeset/honest-pears-play.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@clerk/clerk-react": patch
3+
"@clerk/vue": patch
4+
"@clerk/astro": patch
5+
---
6+
7+
Fixed missing API keys props within `<UserButton />`

packages/astro/src/astro-components/interactive/UserButton/UserButton.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import type { UserButtonProps, UserProfileProps, Without } from '@clerk/types';
33
44
type Props = Without<UserButtonProps, 'userProfileProps'> & {
5-
userProfileProps?: Pick<UserProfileProps, 'additionalOAuthScopes' | 'appearance'>;
5+
userProfileProps?: Pick<UserProfileProps, 'additionalOAuthScopes' | 'appearance' | 'apiKeysProps'>;
66
/**
77
* If you have more than one UserButton on a page, providing a custom ID is required
88
* to properly scope menu items to the correct button.

packages/react/src/components/uiComponents.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ type UserButtonPropsWithoutCustomPages = Without<
7979
UserButtonProps,
8080
'userProfileProps' | '__experimental_asStandalone'
8181
> & {
82-
userProfileProps?: Pick<UserProfileProps, 'additionalOAuthScopes' | 'appearance'>;
82+
userProfileProps?: Pick<UserProfileProps, 'additionalOAuthScopes' | 'appearance' | 'apiKeysProps'>;
8383
/**
8484
* Adding `asProvider` will defer rendering until the `<Outlet />` component is mounted.
8585
*

packages/shared/src/types/clerk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1716,7 +1716,7 @@ export type UserButtonProps = UserButtonProfileMode & {
17161716
* Specify options for the underlying <UserProfile /> component.
17171717
* e.g. <UserButton userProfileProps={{additionalOAuthScopes: {google: ['foo', 'bar'], github: ['qux']}}} />
17181718
*/
1719-
userProfileProps?: Pick<UserProfileProps, 'additionalOAuthScopes' | 'appearance' | 'customPages'>;
1719+
userProfileProps?: Pick<UserProfileProps, 'additionalOAuthScopes' | 'appearance' | 'customPages' | 'apiKeysProps'>;
17201720

17211721
/*
17221722
* Provide custom menu actions and links to be rendered inside the UserButton.

packages/vue/src/components/ui-components/UserButton/UserButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { useUserProfileCustomPages } from '../../../utils/useCustomPages';
88
import { useUserButtonCustomMenuItems } from '../../../utils/useCustomMenuItems';
99
1010
type Props = Omit<UserButtonProps, 'userProfileProps' | 'customMenuItems'> & {
11-
userProfileProps?: Pick<UserProfileProps, 'additionalOAuthScopes' | 'appearance'>;
11+
userProfileProps?: Pick<UserProfileProps, 'additionalOAuthScopes' | 'appearance' | 'apiKeysProps'>;
1212
};
1313
const props = defineProps<Props>();
1414

0 commit comments

Comments
 (0)