Create a password on a Google or Apple account
Gives an account that signs in with Google or Apple only a password as well. The sign-in address and the password then work too; Google and Apple keep working.
Behind the staff switch features.create_password, which is off by default. While it is off this route answers 404, and GET /cognito/sign-in-methods answers canCreatePassword: false; read that field instead of calling this route to find out.
Refused unless all of these hold: the account has no password (to change one, use POST /cognito/change-password with the current password); the session signed in recently, within recentSignIn.maxAgeSeconds of GET /cognito/auth-policy (a token refresh does not count as signing in); the password is inside the length bounds and satisfies the pool policy (upper, lower, digit and symbol).
Needs a real sign-in session: not an API key, and not an admin acting as the user. The change is written to the audit log and the account's owner is emailed a security notice. Rate limited at 30 requests/minute per account and 60 per IP.
Authorizations
In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.
Request Body
Responses
Password created