File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,12 @@ export type Identity = {
57
57
idToken : string
58
58
}
59
59
60
+ export type SignInResponse = {
61
+ sessionId : string ,
62
+ wallet : string ,
63
+ email ?: string ,
64
+ }
65
+
60
66
function encodeHex ( data : string | Uint8Array ) {
61
67
return (
62
68
'0x' +
@@ -215,7 +221,7 @@ export class SequenceWaaS {
215
221
return this . waas . isSignedIn ( )
216
222
}
217
223
218
- async signIn ( creds : Identity , name : string ) : Promise < { sessionId : string ; wallet : string } > {
224
+ async signIn ( creds : Identity , name : string ) : Promise < SignInResponse > {
219
225
// TODO: Be smarter about this, for cognito (or some other cases) we may
220
226
// want to send the email instead of the idToken
221
227
const signInIntent = await this . waas . signIn ( {
@@ -244,7 +250,8 @@ export class SequenceWaaS {
244
250
245
251
return {
246
252
sessionId : res . session . id ,
247
- wallet : res . response . data . wallet
253
+ wallet : res . response . data . wallet ,
254
+ email : res . session . identity . email ,
248
255
}
249
256
} catch ( e ) {
250
257
await this . waas . completeSignOut ( )
You can’t perform that action at this time.
0 commit comments