@zerodev/wallet-core 0.0.1-alpha.7 → 0.0.1-alpha.8
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/README.md +5 -8
- package/dist/_cjs/actions/auth/getUserEmail.js +1 -0
- package/dist/_cjs/actions/auth/getUserEmail.js.map +1 -1
- package/dist/_esm/actions/auth/getUserEmail.js +1 -0
- package/dist/_esm/actions/auth/getUserEmail.js.map +1 -1
- package/dist/_types/actions/auth/getUserEmail.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/actions/auth/getUserEmail.ts +1 -0
package/README.md
CHANGED
|
@@ -87,7 +87,7 @@ await wallet.auth({
|
|
|
87
87
|
|
|
88
88
|
```typescript
|
|
89
89
|
// Send magic link
|
|
90
|
-
await wallet.auth({
|
|
90
|
+
const { otpId } = await wallet.auth({
|
|
91
91
|
type: "otp",
|
|
92
92
|
mode: "sendOtp",
|
|
93
93
|
email: "user@example.com",
|
|
@@ -103,7 +103,6 @@ await wallet.auth({
|
|
|
103
103
|
mode: "verifyOtp",
|
|
104
104
|
otpId,
|
|
105
105
|
otpCode: otp, // OTP from magic link url
|
|
106
|
-
subOrganizationId,
|
|
107
106
|
});
|
|
108
107
|
```
|
|
109
108
|
|
|
@@ -111,7 +110,7 @@ await wallet.auth({
|
|
|
111
110
|
|
|
112
111
|
```typescript
|
|
113
112
|
// Step 1: Send OTP code
|
|
114
|
-
const
|
|
113
|
+
const { otpId } = await wallet.auth({
|
|
115
114
|
type: 'otp',
|
|
116
115
|
mode: 'sendOtp',
|
|
117
116
|
email: 'user@example.com',
|
|
@@ -122,20 +121,18 @@ const data = await wallet.auth({
|
|
|
122
121
|
await wallet.auth({
|
|
123
122
|
type: 'otp',
|
|
124
123
|
mode: 'verifyOtp',
|
|
125
|
-
otpId
|
|
124
|
+
otpId,
|
|
126
125
|
otpCode: '123456',
|
|
127
|
-
subOrganizationId: data.subOrganizationId
|
|
128
126
|
});
|
|
129
127
|
```
|
|
130
128
|
|
|
131
129
|
### OAuth (Google)
|
|
132
130
|
|
|
133
131
|
```typescript
|
|
134
|
-
//
|
|
132
|
+
// Backend handles PKCE and token exchange - no client-side OAuth library needed
|
|
135
133
|
await wallet.auth({
|
|
136
134
|
type: 'oauth',
|
|
137
|
-
provider: 'google'
|
|
138
|
-
credential: googleCredential // JWT from Google
|
|
135
|
+
provider: 'google'
|
|
139
136
|
});
|
|
140
137
|
```
|
|
141
138
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUserEmail.js","sourceRoot":"","sources":["../../../../src/actions/auth/getUserEmail.ts"],"names":[],"mappings":";;AA8BA,
|
|
1
|
+
{"version":3,"file":"getUserEmail.js","sourceRoot":"","sources":["../../../../src/actions/auth/getUserEmail.ts"],"names":[],"mappings":";;AA8BA,oCAeC;AAfM,KAAK,UAAU,YAAY,CAChC,MAAc,EACd,MAA8B;IAE9B,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,MAAM,CAAA;IAE5C,OAAO,MAAM,MAAM,CAAC,OAAO,CAAC;QAC1B,IAAI,EAAE,GAAG,SAAS,aAAa;QAC/B,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,cAAc;SACf;QACD,KAAK,EAAE,IAAI;QACX,YAAY,EAAE,SAAS;KACxB,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUserEmail.js","sourceRoot":"","sources":["../../../../src/actions/auth/getUserEmail.ts"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAAc,EACd,MAA8B;IAE9B,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,MAAM,CAAA;IAE5C,OAAO,MAAM,MAAM,CAAC,OAAO,CAAC;QAC1B,IAAI,EAAE,GAAG,SAAS,aAAa;QAC/B,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,cAAc;SACf;QACD,KAAK,EAAE,IAAI;
|
|
1
|
+
{"version":3,"file":"getUserEmail.js","sourceRoot":"","sources":["../../../../src/actions/auth/getUserEmail.ts"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAAc,EACd,MAA8B;IAE9B,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,MAAM,CAAA;IAE5C,OAAO,MAAM,MAAM,CAAC,OAAO,CAAC;QAC1B,IAAI,EAAE,GAAG,SAAS,aAAa;QAC/B,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,cAAc;SACf;QACD,KAAK,EAAE,IAAI;QACX,YAAY,EAAE,SAAS;KACxB,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUserEmail.d.ts","sourceRoot":"","sources":["../../../../src/actions/auth/getUserEmail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAEnD,MAAM,MAAM,sBAAsB,GAAG;IACnC,mCAAmC;IACnC,cAAc,EAAE,MAAM,CAAA;IACtB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,sBAAsB,CAAC,
|
|
1
|
+
{"version":3,"file":"getUserEmail.d.ts","sourceRoot":"","sources":["../../../../src/actions/auth/getUserEmail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAEnD,MAAM,MAAM,sBAAsB,GAAG;IACnC,mCAAmC;IACnC,cAAc,EAAE,MAAM,CAAA;IACtB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,sBAAsB,CAAC,CAYjC"}
|