wirejs-deploy-amplify-basic 0.0.41 → 0.0.42
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.
|
@@ -279,31 +279,14 @@ export class AuthenticationService extends AuthenticationServiceBase {
|
|
|
279
279
|
const command = new ConfirmSignUpCommand({
|
|
280
280
|
ClientId,
|
|
281
281
|
Username: email,
|
|
282
|
-
ConfirmationCode: form.inputs.code
|
|
282
|
+
ConfirmationCode: form.inputs.code,
|
|
283
283
|
});
|
|
284
284
|
const result = await client.send(command);
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
USERNAME: email
|
|
291
|
-
}
|
|
292
|
-
});
|
|
293
|
-
const signinResult = await client.send(signinCommand);
|
|
294
|
-
signinResult.AuthenticationResult?.AccessToken;
|
|
295
|
-
const jwtPayload = jose.decodeJwt(
|
|
296
|
-
// assuming for now, until we support challenges like OTP, Email code, etc.
|
|
297
|
-
signinResult.AuthenticationResult?.IdToken);
|
|
298
|
-
await this.#cookie.write(cookies, {
|
|
299
|
-
state: 'authenticated',
|
|
300
|
-
user: {
|
|
301
|
-
id: jwtPayload.sub,
|
|
302
|
-
displayName: email,
|
|
303
|
-
username: email,
|
|
304
|
-
}
|
|
305
|
-
});
|
|
306
|
-
return this.getMachineState(cookies);
|
|
285
|
+
await this.#cookie.clear(cookies);
|
|
286
|
+
return {
|
|
287
|
+
...await this.getMachineState(cookies),
|
|
288
|
+
message: 'All done setting up!<br />Give it a try by signing in.'
|
|
289
|
+
};
|
|
307
290
|
}
|
|
308
291
|
catch (error) {
|
|
309
292
|
return {
|