Skip to content

Commit

Permalink
feat(events): add onTokenExpired callback event
Browse files Browse the repository at this point in the history
  • Loading branch information
vilaboim committed May 12, 2021
1 parent 30d15a3 commit 8681fe5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ function init (config, options) {
isFunction(options.onAuthRefreshError) && options.onAuthRefreshError(keycloak)
}

keycloak.onTokenExpired = function () {
isFunction(options.onTokenExpired) && options.onTokenExpired(keycloak)
}

keycloak
.init(options.init)
.then((authenticated) => {
Expand Down

0 comments on commit 8681fe5

Please sign in to comment.