@rxap/plugin-angular 16.1.0-dev.33 → 16.1.0-dev.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [16.1.0-dev.34](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@16.1.0-dev.33...@rxap/plugin-angular@16.1.0-dev.34) (2023-09-19)
7
+
8
+ ### Bug Fixes
9
+
10
+ - support oauth ([a5c1d0d](https://gitlab.com/rxap/packages/commit/a5c1d0d32a6e874c5ad505e46c6803f451664585))
11
+
6
12
  # [16.1.0-dev.33](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@16.1.0-dev.32...@rxap/plugin-angular@16.1.0-dev.33) (2023-09-18)
7
13
 
8
14
  ### Bug Fixes
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "16.1.0-dev.33",
2
+ "version": "16.1.0-dev.34",
3
3
  "name": "@rxap/plugin-angular",
4
4
  "license": "GPL-3.0-or-later",
5
5
  "dependencies": {
@@ -90,7 +90,7 @@
90
90
  },
91
91
  "schematics": "./generators.json",
92
92
  "type": "commonjs",
93
- "gitHead": "dfc4d95a7465857ac3036d282d5191625a20b009",
93
+ "gitHead": "f1bb2d6598d105370781998f8905bf87c4d61dea",
94
94
  "main": "./src/index.js",
95
95
  "types": "./src/index.d.ts"
96
96
  }
@@ -0,0 +1,42 @@
1
+ <html>
2
+ <body>
3
+ <script>
4
+ var checks = [ /[\?|&|#]code=/, /[\?|&|#]error=/, /[\?|&|#]token=/, /[\?|&|#]id_token=/ ];
5
+
6
+ function isResponse(str) {
7
+ if (!str) {
8
+ return false;
9
+ }
10
+ for (var i = 0; i < checks.length; i++) {
11
+ if (str.match(checks[i])) {
12
+ return true;
13
+ }
14
+ }
15
+ return false;
16
+ }
17
+
18
+ var message = isResponse(location.hash) ? location.hash : '#' + location.search;
19
+
20
+ if (window.parent && window.parent !== window) {
21
+ // if loaded as an iframe during silent refresh
22
+ window.parent.postMessage(
23
+ message,
24
+ location.origin,
25
+ );
26
+ } else if (window.opener && window.opener !== window) {
27
+ // if loaded as a popup during initial login
28
+ window.opener.postMessage(
29
+ message,
30
+ location.origin,
31
+ );
32
+ } else {
33
+ // last resort for a popup which has been through redirects and can't use window.opener
34
+ localStorage.setItem(
35
+ 'auth_hash',
36
+ message,
37
+ );
38
+ localStorage.removeItem('auth_hash');
39
+ }
40
+ </script>
41
+ </body>
42
+ </html>