Skip to content

Commit 7a526bb

Browse files
authored
fix(oauth2 scheme): Make oauth2 scheme respect watchLoggedIn property (#1237)
* fix(oauth2 scheme): Make oauth2 scheme respect `watchLoggedIn` property * fix(oauth2 scheme): incorrect options object reference
1 parent 972fa1f commit 7a526bb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/schemes/oauth2.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,10 @@ export class Oauth2Scheme<
424424
}
425425

426426
// Redirect to home
427-
this.$auth.redirect('home', true)
428-
429-
return true // True means a redirect happened
427+
if (this.$auth.options.watchLoggedIn) {
428+
this.$auth.redirect('home', true)
429+
return true // True means a redirect happened
430+
}
430431
}
431432

432433
async refreshTokens(): Promise<HTTPResponse | void> {

0 commit comments

Comments
 (0)