0

I'm using window.crypto.subtle.importKey() for one of the authentication process in my app. Its working when i ran it on node server but its not working when i hosted it on IIS.

Error:

importKey of undefined (Till window.crypto i'm getting)

tweellt
  • 2,171
  • 20
  • 28
Akhil Naidu
  • 789
  • 1
  • 4
  • 16

1 Answers1

3

I found answer for this problem. Chrome restricts the usage of WebCryptographyApi to secure origins. It means 'https'. localhost is a special address enabled for development. Therefore, to use WebCrypto in a real environment you need to setup a SSL/TLS server

Akhil Naidu
  • 789
  • 1
  • 4
  • 16