]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/core/auth/auth.service.ts
Prevent brute force login attack
[github/Chocobozzz/PeerTube.git] / client / src / app / core / auth / auth.service.ts
index f5ca2fcdc9d088c582702d286919082d2340ea3f..d31c6149652af1f366882fa9b8c0a6f69a693cff 100644 (file)
@@ -66,8 +66,12 @@ export class AuthService {
                },
 
                error => {
-                 let errorMessage = `Cannot retrieve OAuth Client credentials: ${error.text}. \n`
-                 errorMessage += 'Ensure you have correctly configured PeerTube (config/ directory), in particular the "webserver" section.'
+                 let errorMessage = error.message
+
+                 if (error.status === 403) {
+                   errorMessage = `Cannot retrieve OAuth Client credentials: ${error.text}. \n`
+                   errorMessage += 'Ensure you have correctly configured PeerTube (config/ directory), in particular the "webserver" section.'
+                 }
 
                  // We put a bigger timeout
                  // This is an important message