Repository: auth0/auth0-spa-js (ts)

Issue:
createAuth0Client promise rejects with an error on Internet Explorer
The error is:

```
unable to get property ‘subtle’ of undefined...
```

https://github.com/auth0/auth0-spa-js/blob/78075fe8d38ab735b954209afb2532d8e90749fc/src/utils.ts#L187

Thanks for keeping IE alive! 😄 

Pull request description:
Fix IE msCrypto.subtle usage
### Description

When abstracting the `crypto` and `subtle` calls, we introduced a bug that prevented IE11 to get the correct instance of `subtle` (which comes from `msCrypto` and not `crypto`. This PR fixes this by using our internal abstraction `getCrypto` which already takes that into consideration.

### References

Fix #241 

### Testing

- [x] This change adds test coverage for new/changed/fixed functionality


Patch:
diff --git a/src/utils.ts b/src/utils.ts
index 8943ae8..c5bc434 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -183,8 +183,9 @@ export const getCrypto = () => {
 };
 
 export const getCryptoSubtle = () => {
+  const crypto = getCrypto();
   //safari 10.x uses webkitSubtle
-  return window.crypto.subtle || (<any>window.crypto).webkitSubtle;
+  return crypto.subtle || (<any>crypto).webkitSubtle;
 };
 
 export const validateCrypto = () => {


Test patch:
diff --git a/__tests__/utils.test.ts b/__tests__/utils.test.ts
index c08aa63..c16217d 100644
--- a/__tests__/utils.test.ts
+++ b/__tests__/utils.test.ts
@@ -527,6 +527,13 @@ describe('utils', () => {
       const theSubtle = getCryptoSubtle();
       expect(theSubtle).toBe('window');
     });
+    it('should use msCrypto.subtle when available', () => {
+      (<any>global).crypto = undefined;
+      (<any>global).msCrypto = { subtle: 'ms' };
+
+      const cryptoSubtle = getCryptoSubtle();
+      expect(cryptoSubtle).toBe('ms');
+    });
   });
   describe('validateCrypto', () => {
     it('should throw error if crypto is unavailable', () => {