wirejs-deploy-amplify-basic 0.0.30 → 0.0.31
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.
|
@@ -129,7 +129,7 @@ export class AuthenticationService extends AuthenticationServiceBase {
|
|
|
129
129
|
const state = await this.#cookie.read(cookies);
|
|
130
130
|
if (state?.state === 'authenticated') {
|
|
131
131
|
if (this.#keepalive)
|
|
132
|
-
this.#cookie.write(cookies, state);
|
|
132
|
+
await this.#cookie.write(cookies, state);
|
|
133
133
|
return {
|
|
134
134
|
...state,
|
|
135
135
|
actions: machineActions('changepassword', 'signout')
|
|
@@ -161,7 +161,7 @@ export class AuthenticationService extends AuthenticationServiceBase {
|
|
|
161
161
|
return {
|
|
162
162
|
state: 'unauthenticated',
|
|
163
163
|
user: undefined,
|
|
164
|
-
actions: machineActions('signin', 'startsignup')
|
|
164
|
+
actions: machineActions('signin', 'startsignup', 'startforgotpassword')
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
167
|
}
|
|
@@ -205,7 +205,7 @@ export class AuthenticationService extends AuthenticationServiceBase {
|
|
|
205
205
|
]
|
|
206
206
|
});
|
|
207
207
|
const result = await client.send(command);
|
|
208
|
-
this.#cookie.write(cookies, {
|
|
208
|
+
await this.#cookie.write(cookies, {
|
|
209
209
|
state: 'unauthenticated',
|
|
210
210
|
user: undefined,
|
|
211
211
|
substate: 'pending-completesignup',
|
|
@@ -234,7 +234,7 @@ export class AuthenticationService extends AuthenticationServiceBase {
|
|
|
234
234
|
if (state?.state === 'authenticated'
|
|
235
235
|
|| state?.substate !== 'pending-completesignup'
|
|
236
236
|
|| !state?.metadata) {
|
|
237
|
-
this.#cookie.write(cookies, {
|
|
237
|
+
await this.#cookie.write(cookies, {
|
|
238
238
|
...state,
|
|
239
239
|
substate: undefined,
|
|
240
240
|
metadata: undefined,
|
|
@@ -282,7 +282,7 @@ export class AuthenticationService extends AuthenticationServiceBase {
|
|
|
282
282
|
ConfirmationCode: form.inputs.code
|
|
283
283
|
});
|
|
284
284
|
await client.send(command);
|
|
285
|
-
this.#cookie.write(cookies, {
|
|
285
|
+
await this.#cookie.write(cookies, {
|
|
286
286
|
state: 'authenticated',
|
|
287
287
|
user: {
|
|
288
288
|
id: sub,
|
|
@@ -318,7 +318,7 @@ export class AuthenticationService extends AuthenticationServiceBase {
|
|
|
318
318
|
const jwtPayload = jose.decodeJwt(
|
|
319
319
|
// assuming for now, until we support challenges like OTP, Email code, etc.
|
|
320
320
|
result.AuthenticationResult?.IdToken);
|
|
321
|
-
this.#cookie.write(cookies, {
|
|
321
|
+
await this.#cookie.write(cookies, {
|
|
322
322
|
state: 'authenticated',
|
|
323
323
|
user: {
|
|
324
324
|
id: jwtPayload.sub,
|
|
@@ -406,7 +406,7 @@ export class AuthenticationService extends AuthenticationServiceBase {
|
|
|
406
406
|
Username: form.inputs.email
|
|
407
407
|
});
|
|
408
408
|
await client.send(command);
|
|
409
|
-
this.#cookie.write(cookies, {
|
|
409
|
+
await this.#cookie.write(cookies, {
|
|
410
410
|
state: 'unauthenticated',
|
|
411
411
|
user: undefined,
|
|
412
412
|
substate: 'pending-completeforgotpassword',
|
|
@@ -440,7 +440,7 @@ export class AuthenticationService extends AuthenticationServiceBase {
|
|
|
440
440
|
Username: state?.metadata
|
|
441
441
|
});
|
|
442
442
|
await client.send(command);
|
|
443
|
-
this.#cookie.write(cookies, {
|
|
443
|
+
await this.#cookie.write(cookies, {
|
|
444
444
|
state: 'unauthenticated',
|
|
445
445
|
user: undefined,
|
|
446
446
|
});
|