-
Notifications
You must be signed in to change notification settings - Fork 174
Successful login instantly returns login page #272
Comments
Also:
|
Taking a look at Chrome's debugger, I can also see Upon inspection, people may notice I'm running this Uchiwa instance behind nginx. |
+1 |
Hi @cmacrae I assume you installed Uchiwa from the source. Could you try to delete the public/bower_components folder and run Thanks! |
Hey @palourde :) Doesn't seem to have solved the issue I'm afraid. |
Hi @cmacrae Could you make sure that the line 12 of the file public/bower_components/uchiwa-web/js/factories.js correspond to this one https://github.com/sensu/uchiwa-web/blob/master/js/factories.js#L12 ? Also, make sure you pulled the latest changes for the Go librairies, especially for the following one: Thanks! |
Hmm, seems line 12 of |
Figured it may also be useful to include the first block of 'use strict';
var factoryModule = angular.module('uchiwa.factories', []);
factoryModule.factory('authInterceptor', function ($cookieStore, $q, $location, userService) {
return {
request: function (config) {
config.headers = config.headers || {};
var auth = $cookieStore.get('uchiwa_auth');
var token = null;
if (angular.isDefined(auth)) {
token = auth.token || null;
}
if (token) {
config.headers.Authorization = 'Bearer ' + token;
}
return config;
},
responseError: function (rejection) {
if (rejection.status === 401 || rejection.status === 403) {
// handle the case where the user is not authenticated
if ($location.path() !== '/login') {
userService.logout();
$location.path('login');
}
}
return $q.reject(rejection);
}
};
}); |
Strange that my [root@sensu /opt/uchiwa/go/src/github.com/sensu/uchiwa]# git remote -v
origin https://github.com/sensu/uchiwa (fetch)
origin https://github.com/sensu/uchiwa (push)
[root@sensu /opt/uchiwa/go/src/github.com/sensu/uchiwa]# git pull origin master
From https://github.com/sensu/uchiwa
* branch master -> FETCH_HEAD
Already up-to-date.
[root@sensu /opt/uchiwa/go/src/github.com/sensu/uchiwa]# echo $?
0 |
@cmacrae Could you try to run the following command in order to reinstall the bower component uchiwa-web: |
Re-installation of
The only way I'm able to reinstall (Thanks for the help so far btw! I'm currently writing an Ansible role for Sensu & Uchiwa on SmartOS, so will be nice to have this working) |
@cmacrae I'll release 0.5.1 today as soon I'm done with few bug fixes, including one for this issue. I'll register the uchiwa-web bower package to the bower registry and also pin the uchiwa-web version in Uchiwa. I'll let you know as soon it's ready! |
@palourde |
0.5.1 packages are now available and uchiwa-web has been registered as a bower package. Let me know if you still face any issue! |
@palourde |
This is the version used in production and staging, the module sets ensure latest by default. There seems to be a bug in the latest version affecting us on preview, which was upgraded sensu/uchiwa#272
First off: thank you for Uchiwa!
Right, now to the point: I'm running Uchiwa (and Sensu) in a SmartOS zone.
Everything works great, apart from the login functionality.
When using the
user
&pass
key/value inconfig.json
, a login page appears as expected, but - upon entering valid credentials - the user is instantly returned to the login page (you can see the interface load for a split second before you're back at the login page).Here's my
config.json
:Note: 'pass' values replaced with '****'
All browser caches have been cleared, along with trying visiting the site on a fresh device that's never visited the Uchiwa instance before - but the problem persists.
I've tried running the process in the foreground to see if anything is spat out to stdout/stderr, but nothing.
When entering incorrect credentials, there's a warning that appears in the web GUI (as expected), and the following is sent to stdout/stderr:
{"Date":"2015-02-20T09:27:27.980366658Z","Level":"info","Src":{"Func":"github.com/palourde/auth.func·004","Line":86},"Output":"Authentication failed: invalid user 'admin' or invalid password"}
Go version is
go1.3.2 solaris/amd64
Node version is
v0.10.36
I've span up a test instance over at https://sensu.cmacr.ae (sorry, self-signed cert :) ) where those willing to look into this can see this behaviour, using the following credentials:
Username: admin
Password: admin
Thanks in advance for any help on this! Please do let me know if there's any other information I can provide that would help the investigation.
Looking forward to contributing to the Sensu/Uchiwa community :)
The text was updated successfully, but these errors were encountered: