@@ -85,7 +85,10 @@ Configuration options can be passed as `Angular2TokenOptions` via `.init()`.
8585constructor(private _tokenService: Angular2TokenService) {
8686 this._tokenService.init({
8787 apiPath: null,
88+
8889 signInPath: ' auth/sign_in' ,
90+ signInRedirect: null,
91+
8992 signOutPath: ' auth/sign_out' ,
9093 validateTokenPath: ' auth/validate_token' ,
9194
@@ -106,6 +109,7 @@ constructor(private _tokenService: Angular2TokenService) {
106109| ----------------------------------- | ----------------------------------------------- |
107110| ` apiPath? : string` | Sets base path all operations are based on |
108111| ` signInPath? : string` | Sets path for sign in |
112+ | ` signInRedirect? : string` | Sets redirect path for failed CanActivate |
109113| ` signOutPath? : string` | Sets path for sign out |
110114| ` validateTokenPath? : string` | Sets path for token validation |
111115| ` registerAccountPath? : string` | Sets path for account registration |
@@ -285,8 +289,9 @@ this._tokenService.currentUser; // ADMIN
285289` ` `
286290
287291# # Route Guards
288- Angular2-Token implements the ` CanActivate` interface, so it can directly be used
289- as a route guard. It currently does not distinguish between user types.
292+ Angular2-Token implements the ` CanActivate` interface, so it can directly be used as a route guard.
293+ If the ` signInRedirect` option is set the user will be redirected on a failed (=false) CanActivate using ` Router.navigate()` .
294+ It currently does not distinguish between user types.
290295
291296# ### Example:
292297` ` ` javascript
0 commit comments