diff options
author | Chocobozzz <me@florianbigard.com> | 2018-12-11 15:27:46 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-12-11 15:27:46 +0100 |
commit | dae5ca24b173aebd16de2a202ccd4088568b8dfb (patch) | |
tree | 29d07d765478776b7c3f91f40443be1acb561df9 /client/src/app/core/auth/auth.service.ts | |
parent | f481c4f9f31e897a08e818f388fecdee07f57142 (diff) | |
download | PeerTube-dae5ca24b173aebd16de2a202ccd4088568b8dfb.tar.gz PeerTube-dae5ca24b173aebd16de2a202ccd4088568b8dfb.tar.zst PeerTube-dae5ca24b173aebd16de2a202ccd4088568b8dfb.zip |
Redirect to the last url on login
Diffstat (limited to 'client/src/app/core/auth/auth.service.ts')
-rw-r--r-- | client/src/app/core/auth/auth.service.ts | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/client/src/app/core/auth/auth.service.ts b/client/src/app/core/auth/auth.service.ts index 443772c9e..5f5730e02 100644 --- a/client/src/app/core/auth/auth.service.ts +++ b/client/src/app/core/auth/auth.service.ts | |||
@@ -14,7 +14,7 @@ import { AuthUser } from './auth-user.model' | |||
14 | import { objectToUrlEncoded } from '@app/shared/misc/utils' | 14 | import { objectToUrlEncoded } from '@app/shared/misc/utils' |
15 | import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage' | 15 | import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage' |
16 | import { I18n } from '@ngx-translate/i18n-polyfill' | 16 | import { I18n } from '@ngx-translate/i18n-polyfill' |
17 | import { HotkeysService, Hotkey } from 'angular2-hotkeys' | 17 | import { Hotkey, HotkeysService } from 'angular2-hotkeys' |
18 | 18 | ||
19 | interface UserLoginWithUsername extends UserLogin { | 19 | interface UserLoginWithUsername extends UserLogin { |
20 | access_token: string | 20 | access_token: string |
@@ -38,7 +38,6 @@ export class AuthService { | |||
38 | loginChangedSource: Observable<AuthStatus> | 38 | loginChangedSource: Observable<AuthStatus> |
39 | userInformationLoaded = new ReplaySubject<boolean>(1) | 39 | userInformationLoaded = new ReplaySubject<boolean>(1) |
40 | hotkeys: Hotkey[] | 40 | hotkeys: Hotkey[] |
41 | redirectUrl: string | ||
42 | 41 | ||
43 | private clientId: string = peertubeLocalStorage.getItem(AuthService.LOCAL_STORAGE_OAUTH_CLIENT_KEYS.CLIENT_ID) | 42 | private clientId: string = peertubeLocalStorage.getItem(AuthService.LOCAL_STORAGE_OAUTH_CLIENT_KEYS.CLIENT_ID) |
44 | private clientSecret: string = peertubeLocalStorage.getItem(AuthService.LOCAL_STORAGE_OAUTH_CLIENT_KEYS.CLIENT_SECRET) | 43 | private clientSecret: string = peertubeLocalStorage.getItem(AuthService.LOCAL_STORAGE_OAUTH_CLIENT_KEYS.CLIENT_SECRET) |
@@ -178,8 +177,6 @@ export class AuthService { | |||
178 | this.setStatus(AuthStatus.LoggedOut) | 177 | this.setStatus(AuthStatus.LoggedOut) |
179 | 178 | ||
180 | this.hotkeysService.remove(this.hotkeys) | 179 | this.hotkeysService.remove(this.hotkeys) |
181 | |||
182 | this.redirectUrl = null | ||
183 | } | 180 | } |
184 | 181 | ||
185 | refreshAccessToken () { | 182 | refreshAccessToken () { |