Skip to content

Commit d367a1f

Browse files
committed
chore: PR tweaks.
1 parent b4d5f4e commit d367a1f

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/components/LogoutLink.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ export function LogoutLink({ children, ...props }: LogoutLinkProps) {
66
const auth = useKindeAuth();
77

88
const logout = useCallback(async () => {
9-
auth.logout({ redirectURL: props.redirectUrl || window.location.origin, allSessions: props.allSessions});
10-
}, [auth, props.redirectUrl]);
9+
auth.logout({
10+
redirectUrl: props.redirectUrl || window.location.origin,
11+
allSessions: props.allSessions,
12+
});
13+
}, [auth, props.redirectUrl, props.allSessions]);
1114

1215
return (
1316
<button

src/state/KindeProvider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ export const KindeProvider = ({
255255
if (options && typeof options === "string") {
256256
params.append("redirect", options);
257257
} else if (typeof options === "object") {
258-
if (options.redirectURL || logoutUri) {
259-
params.append("redirect", options.redirectURL || logoutUri || "");
258+
if (options.redirectUrl || logoutUri) {
259+
params.append("redirect", options.redirectUrl || logoutUri || "");
260260
}
261261
if (options.allSessions) {
262262
params.append("all_sessions", String(options.allSessions));

src/state/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export interface LogoutLinkProps
2424
children: React.ReactNode;
2525
redirectUrl?: string;
2626
allSessions?: boolean;
27-
2827
}
2928

3029
export type ErrorProps = {
@@ -34,5 +33,5 @@ export type ErrorProps = {
3433

3534
export type LogoutOptions = {
3635
allSessions?: boolean;
37-
redirectURL?: string;
36+
redirectUrl?: string;
3837
};

0 commit comments

Comments
 (0)