@magic-ext/oidc 1.0.0 → 2.0.0-canary.538.5339058142.0

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
@@ -1,3 +1,15 @@
1
+ # v1.0.1 (Wed Jan 04 2023)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - add oidc support [#349](https://github.com/magiclabs/magic-js/pull/349) ([@dgerrellsMagic](https://github.com/dgerrellsMagic))
6
+
7
+ #### Authors: 1
8
+
9
+ - [@dgerrellsMagic](https://github.com/dgerrellsMagic)
10
+
11
+ ---
12
+
1
13
  # v1.0.0 (Tue Aug 16 2022)
2
14
 
3
15
  #### Added
package/LICENSE CHANGED
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
package/dist/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var e=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var c=i=>e(i,"__esModule",{value:!0});var h=(i,t)=>{for(var n in t)e(i,n,{get:t[n],enumerable:!0})},l=(i,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of g(t))!m.call(i,o)&&(n||o!=="default")&&e(i,o,{get:()=>t[o],enumerable:!(a=d(t,o))||a.enumerable});return i};var u=(i=>(t,n)=>i&&i.get(t)||(n=l(c({}),t,1),i&&i.set(t,n),n))(typeof WeakMap!="undefined"?new WeakMap:0);var I={};h(I,{MagicOpenIdConnectPayloadMethod:()=>r,OpenIdExtension:()=>p});var s=require("magic-sdk");var r=(t=>(t.LoginWithOIDC="magic_auth_login_with_oidc",t))(r||{});var p=class extends s.Extension.Internal{constructor(){super(...arguments);this.name="openid";this.config={}}loginWithOIDC(t){let n=this.utils.createJsonRpcRequestPayload("magic_auth_login_with_oidc",[t]);return this.request(n)}};module.exports=u(I);
1
+ "use strict";var r=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var d=(i,t)=>{for(var n in t)r(i,n,{get:t[n],enumerable:!0})},h=(i,t,n,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of m(t))!c.call(i,o)&&o!==n&&r(i,o,{get:()=>t[o],enumerable:!(e=g(t,o))||e.enumerable});return i};var l=i=>h(r({},"__esModule",{value:!0}),i);var u={};d(u,{MagicOpenIdConnectPayloadMethod:()=>a,OpenIdExtension:()=>s});module.exports=l(u);var p=require("magic-sdk");var a=(t=>(t.LoginWithOIDC="magic_auth_login_with_oidc",t))(a||{});var s=class extends p.Extension.Internal{constructor(){super(...arguments);this.name="openid";this.config={}}loginWithOIDC(n){let e=this.utils.createJsonRpcRequestPayload("magic_auth_login_with_oidc",[n]);return this.request(e)}};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts", "../../src/types.ts"],
4
- "sourcesContent": ["import { Extension } from 'magic-sdk';\nimport { MagicOpenIdConnectPayloadMethod, LoginWithOpenIdParams } from './types';\n\nexport class OpenIdExtension extends Extension.Internal<'openid', any> {\n name = 'openid' as const;\n config: any = {};\n\n public loginWithOIDC(params: LoginWithOpenIdParams) {\n const requestPayload = this.utils.createJsonRpcRequestPayload(MagicOpenIdConnectPayloadMethod.LoginWithOIDC, [\n params,\n ]);\n return this.request<boolean>(requestPayload);\n }\n}\n\nexport * from './types';\n", "export interface LoginWithOpenIdParams {\n jwt: string;\n providerId: string;\n}\n\nexport enum MagicOpenIdConnectPayloadMethod {\n LoginWithOIDC = 'magic_auth_login_with_oidc',\n}\n"],
5
- "mappings": "8gBAAA,kFAA0B,qBCKnB,GAAK,GAAL,CAAK,GACV,iBAAgB,6BADN,WDFL,mBAA8B,aAAU,QAAwB,CAAhE,aAHP,CAGO,oBACL,UAAO,SACP,YAAc,GAEP,cAAc,EAA+B,CAClD,GAAM,GAAiB,KAAK,MAAM,4BAA4B,6BAA+C,CAC3G,IAEF,MAAO,MAAK,QAAiB",
6
- "names": []
4
+ "sourcesContent": ["import { Extension } from 'magic-sdk';\nimport { MagicOpenIdConnectPayloadMethod, LoginWithOpenIdParams } from './types';\n\nexport class OpenIdExtension extends Extension.Internal<'openid', any> {\n name = 'openid' as const;\n config: any = {};\n\n public loginWithOIDC(params: LoginWithOpenIdParams) {\n const requestPayload = this.utils.createJsonRpcRequestPayload(MagicOpenIdConnectPayloadMethod.LoginWithOIDC, [\n params,\n ]);\n return this.request<string>(requestPayload);\n }\n}\n\nexport * from './types';\n", "export interface LoginWithOpenIdParams {\n jwt: string;\n providerId: string;\n}\n\nexport enum MagicOpenIdConnectPayloadMethod {\n LoginWithOIDC = 'magic_auth_login_with_oidc',\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qCAAAE,EAAA,oBAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAA0B,qBCKnB,IAAKC,OACVA,EAAA,cAAgB,6BADNA,OAAA,IDFL,IAAMC,EAAN,cAA8B,YAAU,QAAwB,CAAhE,kCACL,UAAO,SACP,YAAc,CAAC,EAER,cAAcC,EAA+B,CAClD,IAAMC,EAAiB,KAAK,MAAM,yDAA2E,CAC3GD,CACF,CAAC,EACD,OAAO,KAAK,QAAgBC,CAAc,CAC5C,CACF",
6
+ "names": ["src_exports", "__export", "MagicOpenIdConnectPayloadMethod", "OpenIdExtension", "__toCommonJS", "import_magic_sdk", "MagicOpenIdConnectPayloadMethod", "OpenIdExtension", "params", "requestPayload"]
7
7
  }
package/dist/es/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{Extension as o}from"magic-sdk";var i=(t=>(t.LoginWithOIDC="magic_auth_login_with_oidc",t))(i||{});var e=class extends o.Internal{constructor(){super(...arguments);this.name="openid";this.config={}}loginWithOIDC(t){let n=this.utils.createJsonRpcRequestPayload("magic_auth_login_with_oidc",[t]);return this.request(n)}};export{i as MagicOpenIdConnectPayloadMethod,e as OpenIdExtension};
1
+ import{Extension as r}from"magic-sdk";var i=(t=>(t.LoginWithOIDC="magic_auth_login_with_oidc",t))(i||{});var n=class extends r.Internal{constructor(){super(...arguments);this.name="openid";this.config={}}loginWithOIDC(o){let e=this.utils.createJsonRpcRequestPayload("magic_auth_login_with_oidc",[o]);return this.request(e)}};export{i as MagicOpenIdConnectPayloadMethod,n as OpenIdExtension};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts", "../../src/types.ts"],
4
- "sourcesContent": ["import { Extension } from 'magic-sdk';\nimport { MagicOpenIdConnectPayloadMethod, LoginWithOpenIdParams } from './types';\n\nexport class OpenIdExtension extends Extension.Internal<'openid', any> {\n name = 'openid' as const;\n config: any = {};\n\n public loginWithOIDC(params: LoginWithOpenIdParams) {\n const requestPayload = this.utils.createJsonRpcRequestPayload(MagicOpenIdConnectPayloadMethod.LoginWithOIDC, [\n params,\n ]);\n return this.request<boolean>(requestPayload);\n }\n}\n\nexport * from './types';\n", "export interface LoginWithOpenIdParams {\n jwt: string;\n providerId: string;\n}\n\nexport enum MagicOpenIdConnectPayloadMethod {\n LoginWithOIDC = 'magic_auth_login_with_oidc',\n}\n"],
5
- "mappings": "AAAA,sCCKO,GAAK,GAAL,CAAK,GACV,iBAAgB,6BADN,WDFL,mBAA8B,GAAU,QAAwB,CAAhE,aAHP,CAGO,oBACL,UAAO,SACP,YAAc,GAEP,cAAc,EAA+B,CAClD,GAAM,GAAiB,KAAK,MAAM,4BAA4B,6BAA+C,CAC3G,IAEF,MAAO,MAAK,QAAiB",
6
- "names": []
4
+ "sourcesContent": ["import { Extension } from 'magic-sdk';\nimport { MagicOpenIdConnectPayloadMethod, LoginWithOpenIdParams } from './types';\n\nexport class OpenIdExtension extends Extension.Internal<'openid', any> {\n name = 'openid' as const;\n config: any = {};\n\n public loginWithOIDC(params: LoginWithOpenIdParams) {\n const requestPayload = this.utils.createJsonRpcRequestPayload(MagicOpenIdConnectPayloadMethod.LoginWithOIDC, [\n params,\n ]);\n return this.request<string>(requestPayload);\n }\n}\n\nexport * from './types';\n", "export interface LoginWithOpenIdParams {\n jwt: string;\n providerId: string;\n}\n\nexport enum MagicOpenIdConnectPayloadMethod {\n LoginWithOIDC = 'magic_auth_login_with_oidc',\n}\n"],
5
+ "mappings": "AAAA,OAAS,aAAAA,MAAiB,YCKnB,IAAKC,OACVA,EAAA,cAAgB,6BADNA,OAAA,IDFL,IAAMC,EAAN,cAA8BC,EAAU,QAAwB,CAAhE,kCACL,UAAO,SACP,YAAc,CAAC,EAER,cAAcC,EAA+B,CAClD,IAAMC,EAAiB,KAAK,MAAM,yDAA2E,CAC3GD,CACF,CAAC,EACD,OAAO,KAAK,QAAgBC,CAAc,CAC5C,CACF",
6
+ "names": ["Extension", "MagicOpenIdConnectPayloadMethod", "OpenIdExtension", "Extension", "params", "requestPayload"]
7
7
  }
package/dist/es/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import{Extension as o}from"magic-sdk";var i=(t=>(t.LoginWithOIDC="magic_auth_login_with_oidc",t))(i||{});var e=class extends o.Internal{constructor(){super(...arguments);this.name="openid";this.config={}}loginWithOIDC(t){let n=this.utils.createJsonRpcRequestPayload("magic_auth_login_with_oidc",[t]);return this.request(n)}};export{i as MagicOpenIdConnectPayloadMethod,e as OpenIdExtension};
1
+ import{Extension as r}from"magic-sdk";var i=(t=>(t.LoginWithOIDC="magic_auth_login_with_oidc",t))(i||{});var n=class extends r.Internal{constructor(){super(...arguments);this.name="openid";this.config={}}loginWithOIDC(o){let e=this.utils.createJsonRpcRequestPayload("magic_auth_login_with_oidc",[o]);return this.request(e)}};export{i as MagicOpenIdConnectPayloadMethod,n as OpenIdExtension};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts", "../../src/types.ts"],
4
- "sourcesContent": ["import { Extension } from 'magic-sdk';\nimport { MagicOpenIdConnectPayloadMethod, LoginWithOpenIdParams } from './types';\n\nexport class OpenIdExtension extends Extension.Internal<'openid', any> {\n name = 'openid' as const;\n config: any = {};\n\n public loginWithOIDC(params: LoginWithOpenIdParams) {\n const requestPayload = this.utils.createJsonRpcRequestPayload(MagicOpenIdConnectPayloadMethod.LoginWithOIDC, [\n params,\n ]);\n return this.request<boolean>(requestPayload);\n }\n}\n\nexport * from './types';\n", "export interface LoginWithOpenIdParams {\n jwt: string;\n providerId: string;\n}\n\nexport enum MagicOpenIdConnectPayloadMethod {\n LoginWithOIDC = 'magic_auth_login_with_oidc',\n}\n"],
5
- "mappings": "AAAA,sCCKO,GAAK,GAAL,CAAK,GACV,iBAAgB,6BADN,WDFL,mBAA8B,GAAU,QAAwB,CAAhE,aAHP,CAGO,oBACL,UAAO,SACP,YAAc,GAEP,cAAc,EAA+B,CAClD,GAAM,GAAiB,KAAK,MAAM,4BAA4B,6BAA+C,CAC3G,IAEF,MAAO,MAAK,QAAiB",
6
- "names": []
4
+ "sourcesContent": ["import { Extension } from 'magic-sdk';\nimport { MagicOpenIdConnectPayloadMethod, LoginWithOpenIdParams } from './types';\n\nexport class OpenIdExtension extends Extension.Internal<'openid', any> {\n name = 'openid' as const;\n config: any = {};\n\n public loginWithOIDC(params: LoginWithOpenIdParams) {\n const requestPayload = this.utils.createJsonRpcRequestPayload(MagicOpenIdConnectPayloadMethod.LoginWithOIDC, [\n params,\n ]);\n return this.request<string>(requestPayload);\n }\n}\n\nexport * from './types';\n", "export interface LoginWithOpenIdParams {\n jwt: string;\n providerId: string;\n}\n\nexport enum MagicOpenIdConnectPayloadMethod {\n LoginWithOIDC = 'magic_auth_login_with_oidc',\n}\n"],
5
+ "mappings": "AAAA,OAAS,aAAAA,MAAiB,YCKnB,IAAKC,OACVA,EAAA,cAAgB,6BADNA,OAAA,IDFL,IAAMC,EAAN,cAA8BC,EAAU,QAAwB,CAAhE,kCACL,UAAO,SACP,YAAc,CAAC,EAER,cAAcC,EAA+B,CAClD,IAAMC,EAAiB,KAAK,MAAM,yDAA2E,CAC3GD,CACF,CAAC,EACD,OAAO,KAAK,QAAgBC,CAAc,CAC5C,CACF",
6
+ "names": ["Extension", "MagicOpenIdConnectPayloadMethod", "OpenIdExtension", "Extension", "params", "requestPayload"]
7
7
  }
package/dist/extension.js CHANGED
@@ -1,2 +1,2 @@
1
- var MagicOpenIdConnectExtension=(()=>{var O=Object.create;var n=Object.defineProperty;var W=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols,L=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var g=(o,t,e)=>t in o?n(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,c=(o,t)=>{for(var e in t||(t={}))d.call(t,e)&&g(o,e,t[e]);if(m)for(var e of m(t))P.call(t,e)&&g(o,e,t[e]);return o};var h=o=>n(o,"__esModule",{value:!0});var _=(o,t)=>()=>(t||o((t={exports:{}}).exports,t),t.exports),l=(o,t)=>{for(var e in t)n(o,e,{get:t[e],enumerable:!0})},u=(o,t,e,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of y(t))!d.call(o,i)&&(e||i!=="default")&&n(o,i,{get:()=>t[i],enumerable:!(p=W(t,i))||p.enumerable});return o},b=(o,t)=>u(h(n(o!=null?O(L(o)):{},"default",!t&&o&&o.__esModule?{get:()=>o.default,enumerable:!0}:{value:o,enumerable:!0})),o),q=(o=>(t,e)=>o&&o.get(t)||(e=u(h({}),t,1),o&&o.set(t,e),e))(typeof WeakMap!="undefined"?new WeakMap:0);var I=_((w,x)=>{x.exports=Magic});var D={};l(D,{default:()=>C});var f=b(I());var s={};l(s,{MagicOpenIdConnectPayloadMethod:()=>a});var a=(t=>(t.LoginWithOIDC="magic_auth_login_with_oidc",t))(a||{});var r=class extends f.Extension.Internal{constructor(){super(...arguments);this.name="openid";this.config={}}loginWithOIDC(t){let e=this.utils.createJsonRpcRequestPayload("magic_auth_login_with_oidc",[t]);return this.request(e)}};Object.assign(r,c({},s));var C=r;return q(D);})();
1
+ "use strict";var MagicOpenIdConnectExtension=(()=>{var I=Object.create;var n=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var W=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols,y=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var g=(i,t,o)=>t in i?n(i,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):i[t]=o,d=(i,t)=>{for(var o in t||(t={}))c.call(t,o)&&g(i,o,t[o]);if(m)for(var o of m(t))L.call(t,o)&&g(i,o,t[o]);return i};var P=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),h=(i,t)=>{for(var o in t)n(i,o,{get:t[o],enumerable:!0})},l=(i,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of W(t))!c.call(i,e)&&e!==o&&n(i,e,{get:()=>t[e],enumerable:!(s=O(t,e))||s.enumerable});return i};var _=(i,t,o)=>(o=i!=null?I(y(i)):{},l(t||!i||!i.__esModule?n(o,"default",{value:i,enumerable:!0}):o,i)),q=i=>l(n({},"__esModule",{value:!0}),i);var f=P((j,u)=>{u.exports=Magic});var D={};h(D,{default:()=>C});var x=_(f());var p={};h(p,{MagicOpenIdConnectPayloadMethod:()=>a});var a=(t=>(t.LoginWithOIDC="magic_auth_login_with_oidc",t))(a||{});var r=class extends x.Extension.Internal{constructor(){super(...arguments);this.name="openid";this.config={}}loginWithOIDC(o){let s=this.utils.createJsonRpcRequestPayload("magic_auth_login_with_oidc",[o]);return this.request(s)}};Object.assign(r,d({},p));var C=r;return q(D);})();
2
2
  if (MagicOpenIdConnectExtension && MagicOpenIdConnectExtension.default != null) { MagicOpenIdConnectExtension = Object.assign(MagicOpenIdConnectExtension.default, MagicOpenIdConnectExtension); delete MagicOpenIdConnectExtension.default; }
@@ -3,8 +3,8 @@ import { LoginWithOpenIdParams } from './types';
3
3
  export declare class OpenIdExtension extends Extension.Internal<'openid', any> {
4
4
  name: "openid";
5
5
  config: any;
6
- loginWithOIDC(params: LoginWithOpenIdParams): import("magic-sdk").PromiEvent<boolean, {
7
- done: (result: boolean) => void;
6
+ loginWithOIDC(params: LoginWithOpenIdParams): import("magic-sdk").PromiEvent<string, {
7
+ done: (result: string) => void;
8
8
  error: (reason: any) => void;
9
9
  settled: () => void;
10
10
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magic-ext/oidc",
3
- "version": "1.0.0",
3
+ "version": "2.0.0-canary.538.5339058142.0",
4
4
  "description": "Magic OIDC SDK Extension for Web environments.",
5
5
  "author": "Magic <team@magic.link> (https://magic.link/)",
6
6
  "license": "MIT",
@@ -28,5 +28,6 @@
28
28
  },
29
29
  "devDependencies": {
30
30
  "magic-sdk": "^9.0.0"
31
- }
31
+ },
32
+ "gitHead": "8443af6f120578ac8d93810debe803e63e71b557"
32
33
  }