@@ -263,7 +263,7 @@ <h4 id="examples-password-signin">Password-based Sign-in</h4>
263
263
return;
264
264
}
265
265
if (credential.type == "< a const > password</ a > ") {
266
- fetch("https://example.com/loginEndpoint", { body: credential.< a > toFormData()</ a > })
266
+ fetch("https://example.com/loginEndpoint", { body: credential.< a > toFormData()</ a > , method: "POST" })
267
267
.then(function (response) {
268
268
// Notify the user that signin succeeded! Do amazing, signed-in things!
269
269
});
@@ -314,7 +314,7 @@ <h4 id="examples-federated-signin">Federated Sign-in</h4>
314
314
// ...
315
315
}
316
316
} else {
317
- fetch("https://example.com/loginEndpoint", { body: credential.< a > toFormData()</ a > })
317
+ fetch("https://example.com/loginEndpoint", { body: credential.< a > toFormData()</ a > , method: "POST" })
318
318
.then(function (response) { ... })
319
319
.catch(function (response) { ... });
320
320
}
@@ -344,7 +344,7 @@ <h4 id="examples-post-signin">Post-sign-in Confirmation</h4>
344
344
"< a idl for ="CredentialData "> id</ a > ": "JaneDoe98",
345
345
"< a idl for ="PasswordCredentialData "> password</ a > ": "MfPeRQq5P3yVry68Q4KZMMhB"
346
346
});
347
- fetch("https://example.com/sign-in/", { body: credential.< a > toFormData()</ a > })
347
+ fetch("https://example.com/sign-in/", { body: credential.< a > toFormData()</ a > , method: "POST" })
348
348
.then(function (response) {
349
349
if (response.status == 200)
350
350
navigator.< a attribute > credentials</ a > .< a idl lt ="store() "> store</ a > (credential);
0 commit comments