Skip to content

Commit 92b186d

Browse files
committed
fix(react): use cookienames from options in auth provider
Even though you can set it, it's not being used
1 parent ab8e1ce commit 92b186d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.changeset/tidy-cows-hang.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@labdigital/federated-token-react": patch
3+
---
4+
5+
Use cookieNames from options when setting up auth provider

packages/react/src/provider.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ export function AuthProvider({
110110
loading: true,
111111
});
112112

113-
const cookieNames = DEFAULT_COOKIE_NAMES;
113+
const cookieNames = {
114+
...DEFAULT_COOKIE_NAMES,
115+
...options.cookieNames,
116+
};
114117

115118
const updateAuthState = useCallback((token?: TokenData) => {
116119
if (token?.isAuthenticated) {

0 commit comments

Comments
 (0)