Skip to content

Commit

Permalink
fix(keycloak): Fix wrong refresh token expiration date (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacouille authored Feb 7, 2024
1 parent af4e780 commit 2566ab4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .changesets/176co.patch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix: Fix wrong refresh token expiration date in Keycloak provider
4 changes: 2 additions & 2 deletions src/providers/keycloak.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class Keycloak implements OAuth2ProviderWithPKCE {
accessToken: result.access_token,
accessTokenExpiresAt: createDate(new TimeSpan(result.expires_in, "s")),
refreshToken: result.refresh_token,
refreshTokenExpiresAt: createDate(new TimeSpan(result.expires_in, "s")),
refreshTokenExpiresAt: createDate(new TimeSpan(result.refresh_expires_in, "s")),
idToken: result.id_token
};
return tokens;
Expand All @@ -60,7 +60,7 @@ export class Keycloak implements OAuth2ProviderWithPKCE {
accessToken: result.access_token,
accessTokenExpiresAt: createDate(new TimeSpan(result.expires_in, "s")),
refreshToken: result.refresh_token,
refreshTokenExpiresAt: createDate(new TimeSpan(result.expires_in, "s")),
refreshTokenExpiresAt: createDate(new TimeSpan(result.refresh_expires_in, "s")),
idToken: result.id_token
};
return tokens;
Expand Down

0 comments on commit 2566ab4

Please sign in to comment.