Allowing alternative authentication methods on ohif:user package
This commit is contained in:
1 parent
0a82bfd6b6
commit
dc405e53da
4 files changed
+39
-12
No files matched your search
@@ -1,2 +1,3 @@
|
||||
import './getName';
|
||||
import './login';
|
||||
import './logout';
|
||||
@@ -0,0 +1,14 @@
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
OHIF.user.login = params => {
|
||||
return new Promise((resolve, reject) => {
|
||||
Meteor.loginWithPassword(params.username, params.password, error => {
|
||||
if (error) {
|
||||
return reject(error);
|
||||
}
|
||||
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
};
|
||||
Reference in new issue
Block a user