Skip to content
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.

Commit

Permalink
Add UserSignedIn hooks to UserManagerEvents type
Browse files Browse the repository at this point in the history
Fix for #1051
  • Loading branch information
coolhome authored Dec 15, 2020
1 parent 5ef0f4c commit 1e17c8a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ export interface UserManagerEvents extends AccessTokenEvents {
addSilentRenewError(callback: UserManagerEvents.SilentRenewErrorCallback): void;
removeSilentRenewError(callback: UserManagerEvents.SilentRenewErrorCallback): void;

/** Subscribe to events raised when the user's signed-in */
addUserSignedIn(callback: UserManagerEvents.UserSignedInCallback): void;
removeUserSignedIn(callback: UserManagerEvents.UserSignedInCallback): void;

/** Subscribe to events raised when the user's sign-in status at the OP has changed */
addUserSignedOut(callback: UserManagerEvents.UserSignedOutCallback): void;
removeUserSignedOut(callback: UserManagerEvents.UserSignedOutCallback): void;
Expand All @@ -261,6 +265,7 @@ export namespace UserManagerEvents {
export type UserLoadedCallback = (user: User) => void;
export type UserUnloadedCallback = () => void;
export type SilentRenewErrorCallback = (error: Error) => void;
export type UserSignedInCallback = () => void;
export type UserSignedOutCallback = () => void;
export type UserSessionChangedCallback = () => void;
}
Expand Down

0 comments on commit 1e17c8a

Please sign in to comment.