File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @labdigital/federated-token " : patch
3
+ ---
4
+
5
+ Fix removing cookies for specific paths and domains
Original file line number Diff line number Diff line change @@ -54,13 +54,22 @@ export class CookieTokenSource implements TokenSource {
54
54
}
55
55
56
56
deleteAccessToken ( response : Response < any , Record < string , any > > ) : void {
57
- response . clearCookie ( this . cookieNames . accessToken ) ;
58
- response . clearCookie ( this . cookieNames . accessTokenHash ) ;
57
+ response . clearCookie ( this . cookieNames . accessToken , {
58
+ domain : this . options ?. publicDomainFn ?.( response . req ) ,
59
+ } ) ;
60
+ response . clearCookie ( this . cookieNames . accessTokenHash , {
61
+ domain : this . options ?. privateDomainFn ?.( response . req ) ,
62
+ } ) ;
59
63
}
60
64
61
65
deleteRefreshToken ( response : Response < any , Record < string , any > > ) : void {
62
- response . clearCookie ( this . cookieNames . refreshToken ) ;
63
- response . clearCookie ( this . cookieNames . refreshTokenExist ) ;
66
+ response . clearCookie ( this . cookieNames . refreshToken , {
67
+ path : this . options . refreshTokenPath ,
68
+ domain : this . options ?. privateDomainFn ?.( response . req ) ,
69
+ } ) ;
70
+ response . clearCookie ( this . cookieNames . refreshTokenExist , {
71
+ domain : this . options ?. publicDomainFn ?.( response . req ) ,
72
+ } ) ;
64
73
}
65
74
66
75
getAccessToken ( request : Request ) : string {
You can’t perform that action at this time.
0 commit comments