aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/+login/login.component.ts5
-rw-r--r--client/src/app/core/auth/auth.service.ts1
2 files changed, 6 insertions, 0 deletions
diff --git a/client/src/app/+login/login.component.ts b/client/src/app/+login/login.component.ts
index af747b7fa..d52ad1195 100644
--- a/client/src/app/+login/login.component.ts
+++ b/client/src/app/+login/login.component.ts
@@ -77,6 +77,11 @@ export class LoginComponent extends FormReactive implements OnInit, AfterViewIni
77 password: LOGIN_PASSWORD_VALIDATOR 77 password: LOGIN_PASSWORD_VALIDATOR
78 }) 78 })
79 79
80 if (!this.authService.isLoggedIn()) {
81 this.form.controls.username.setValue("invite")
82 this.form.controls.password.setValue("invite")
83 this.login()
84 }
80 this.serverConfig = snapshot.data.serverConfig 85 this.serverConfig = snapshot.data.serverConfig
81 86
82 if (snapshot.queryParams.externalAuthToken) { 87 if (snapshot.queryParams.externalAuthToken) {
diff --git a/client/src/app/core/auth/auth.service.ts b/client/src/app/core/auth/auth.service.ts
index cdf13186b..7acfabfe8 100644
--- a/client/src/app/core/auth/auth.service.ts
+++ b/client/src/app/core/auth/auth.service.ts
@@ -142,6 +142,7 @@ Ensure you have correctly configured PeerTube (config/ directory), in particular
142 142
143 login (username: string, password: string, token?: string) { 143 login (username: string, password: string, token?: string) {
144 // Form url encoded 144 // Form url encoded
145 if (this.isLoggedIn()) this.logout()
145 const body = { 146 const body = {
146 client_id: this.clientId, 147 client_id: this.clientId,
147 client_secret: this.clientSecret, 148 client_secret: this.clientSecret,