Skip to content

Commit 23dded7

Browse files
fix(types): support organizations {id,name}[] in getClaim
1 parent 56be052 commit 23dded7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/utils/token/getClaim.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { getClaims } from "./getClaims";
55
*
66
* @param keyName key to get from the token
77
* @param {("accessToken"|"idToken")} [tokenType="accessToken"] - Type of token to get claims from
8-
* @returns { Promise<string | number | string[] | null> }
8+
* @returns { Promise<string | number | string[] | { id: string; name: string }[] | null> }
99
*/
10-
export const getClaim = async <T = JWTDecoded, V = string | number | string[]>(
10+
export const getClaim = async <T = JWTDecoded, V = string | number | string[] | { id: string; name: string }[]>(
1111
keyName: keyof T,
1212
tokenType: "accessToken" | "idToken" = "accessToken",
1313
): Promise<{

0 commit comments

Comments
 (0)