I am a little confused by your question. If you ask:
Can I create new Facebook / Google usernames and passwords programmatically?
Then the answer is no. You must register with Facebook / Google on your site. If you ask:
Is it possible to create a new user with a username and password that exists only in Cognito?
Then the answer is yes. To do this, it depends on whether you are creating a user in a browser or on a server. In the browser, use the Cognito Javascript API . On the server, use the Cognito Admin Server API .
Here is a sample code for creating a new user on the server in Node JS (replace my lines with your tokens, especially those with @ signs):
let params = { UserPoolId: "@ cognito_pool_id@ ", Username: "jhancock", DesiredDeliveryMediums: ["EMAIL"], ForceAliasCreation: false, MessageAction: "SUPPRESS", TemporaryPassword: "somePassword", UserAttributes: [ { Name: "given_name", Value: "John"}, { Name: "family_name", Value: "Hancock"}, { Name: "name", Value: "John Hancock"}, { Name: "email", Value: " john@gmail.com "}, { Name: "phone_number", Value: "+15125551212"} ], }; console.log("Sending params to cognito: " + JSON.stringify(params)); let cognitoIdentityServiceProvider = new AWS.CognitoIdentityServiceProvider({region: "us-east-1"}); cognitoIdentityServiceProvider.adminCreateUser(params, function(error, data) { if (error) { console.log("Error adding user to cognito: " + JSON.stringify(error), error.stack); } else { console.log("Received back from cognito: " + JSON.stringify(data)); } }
Once you get this job, you probably want to see this post on how to change the temporary password to a real one .