How to pass AWS access credentials from JavaSCript to PHP?

192 Views Asked by At

I have a JavaScript to authenticate a user using Cognito Federated Service.

I am able to authenticate user and get access credentials :

AWS.config.credentials.get(function(){
var accessKeyId = AWS.config.credentials.accessKeyId;
var secretAccessKey = AWS.config.credentials.secretAccessKey;
var sessionToken = AWS.config.credentials.sessionToken;
console.log("Access Key:", AWS.config.credentials.accessKeyId);
console.log("Secret Access Key:", AWS.config.credentials.secretAccessKey);
console.log("Session Token:", AWS.config.credentials.sessionToken);
});

How should I pass these credentials to PHP file.function ? Should I pass them in URL itself ?

0

There are 0 best solutions below