Error attributes is not an option object #960
Unanswered
Moaaz-Hajat
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is the error I receive when trying to configure my login using the ActiveDirectoryStrategy in a Next JS application
TypeError: employeeID, sn, givenName is not an Option Object
See Login Strategy below
const attributes = {
user: [
'dn', 'distinguishedName',
'userPrincipalName', 'sAMAccountName', 'mail',
'lockoutTime', 'whenCreated', 'pwdLastSet', 'userAccountControl',
'employeeID', 'sn', 'givenName', 'initials', 'cn', 'displayName',
'comment', 'description'
],
group: [
'dn', 'cn', 'description', 'distinguishedName', 'objectCategory'
]
};
passport.use(new ActiveDirectoryStrategy({
integrated: false,
ldap: {
url: "",
baseDN: dn,
username: ''
password: '***',
attributes: attributes
}
}, async function (profile, ad, done) {
console.log(
ad:
, ad);console.log(
profile:
, profile);let user = profile._json;
console.log(
AD user:
, user);return done(null, user);
}));
Beta Was this translation helpful? Give feedback.
All reactions