jlguenego / node-expose-sspi

Expose Microsoft Windows SSPI to Node for SSO authentication.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

crash with Electron

Chris55 opened this issue · comments

commented

Describe the bug
SSO authentication in an Electron app using node-expose-sspi is not working.

isActiveDirectoryReachable() returns always false and a breakpoint in domain.js line 41 the catch(e) {return false) shows:

Error: CoInitializeEx has failed: 0x80010106
at Object.openADConnection

To Reproduce

Sample is available here: https://github.com/Chris55/galere

Trace
2022-02-01T10:42:17.003Z node-expose-sspi:userdb getUser start
2022-02-01T10:42:17.006Z node-expose-sspi:adConnection closeADConnection: counter: 0
Warning: Active Directory not reachable

Expected behavior
isActiveDirectoryReachable() should return true and getUser() my user details.

Screenshots
Capture

Environment version:

  • Windows 10 version 1909
  • node: '16.9.1',
  • electron: '16.0.8',
  • chrome: '96.0.4664.110'

Please indicates also:

  • Are you on a Windows domain ? yes
  • Can you reach the domain controller ? yes
  • Do your session have admin privileges ? no
  • Which authentication protocol ? Kerberos
  • Active Directory, or local window policies that could impact the authentication.: no

Additional context
it works fine on a simple node project without Electron.