You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I am trying to implement node-sspi in my reactjs project using react-admin framework.
I tested node-sspi in a test express app and it worked just right.
I dont really know how to implement this outside of the express context, but I can not really try either because I get the error "TypeError: Cannot read property '0' of null" by just requiring it.
import nodeSSPI from 'node-sspi'; var util = require('util');
export default {
// called when the user attempts to log in
login: ({ username }) => {
localStorage.setItem('username', username);
// accept all username/password combinations
return Promise.resolve();
},
// called when the user clicks on the logout button
logout: () => {
localStorage.removeItem('username');
return Promise.resolve();
},
// called when the API returns an error
checkError: ({ status }) => {
if (status === 401 || status === 403) {
localStorage.removeItem('username');
return Promise.reject();
}
return Promise.resolve();
},
// called when the user navigates to a new location, to check for authentication
checkAuth: () => {
return localStorage.getItem('username')
? Promise.resolve()
: Promise.reject();
},
// called when the user navigates to a new location, to check for permissions / roles
getPermissions: () => Promise.resolve(),
};`
The text was updated successfully, but these errors were encountered:
Hi!
I am trying to implement node-sspi in my reactjs project using react-admin framework.
I tested node-sspi in a test express app and it worked just right.
I dont really know how to implement this outside of the express context, but I can not really try either because I get the error "TypeError: Cannot read property '0' of null" by just requiring it.
import nodeSSPI from 'node-sspi'; var util = require('util');
export default {
};`
![nodesspi](https://user-images.githubusercontent.com/30511114/78987922-b6df7a80-7b2f-11ea-9a0d-d01125a5d456.PNG)
The text was updated successfully, but these errors were encountered: