Configure authentication using Amazon Cognito.
{ identityId : String
, credentials : Credentials
}
IdentityId
{ accessKeyId : String
, secretAccessKey : String
, expiration : Time.Posix
, sessionToken : Maybe String
}
Credentials
{ region : AWS.Config.Region
, identityPoolId : String
}
Auth config
configure : Config -> Task (AWS.Http.Error AWS.Http.AWSAppError) Identity
Configure authentication.
Fetches identity id from identity pool and then fetches credentials for identity id.
AWS.Amplify.Auth.configure
{ region = "ap-southeast-2"
, identityPoolId = "ap-southeast-2:123e4567-e89b-12d3-a456-426614174000"
}
getCredentials : AWS.Config.Region -> String -> Task (AWS.Http.Error AWS.Http.AWSAppError) Identity
Get credentials for identityId