app.Use(async...
To initialize the device for use
. I'm having a hard time determining which cert I'm supposed to be passing and if I need to generate a csr.
options.Events = new OpenIdConnectEvents
{
OnRemoteFailure = context =>
{
if (context.Failure.Message.Contains("Correlation failed"))
context.Response.Redirect("/");
else
throw new Exception("ERROR");
context.HandleResponse();
return Task.CompletedTask;
},
}
I'm facing another weird stuff, let me see if you guys point me to the right direction
This is what I'm trying to accomplish:
If the user login successfully and completed an operation and then instead of signing out just closes the browser tab. Now let's say that after a period of 10 minutes, the user decides to log in again I want to redirect the user to the login page. Instead of automatically login in and go directly to the homepage (that's the behavior that is currently happening).
Hello there, I hope someone can help me, I have been searching everywhere without finding a solution that works.
I am using the AWS sdk in dotnet 3.1 worker service to process and upload files to MinIO. Smaller uploads work correctly using the low-level API, but as soon as uploads go over 25mb or so, the uploads get stuck at 100% on the CompleteMultipartUploadAsync. It eventually times out and then fails to complete the upload.
Can someone push me in the right direction?
First of all, thank you for the great work.
I am creating an authentication process using Cognito's StartWithCustomAuthAsync, but I am having an issue with the userAttributes email being undefined in the lambda function that is triggered by this execution. Do you have a solution?
client side code
private static IDictionary<string, string> CreateClientMetadata(string username)
{
Dictionary<string, string> meta = new Dictionary<string, string>
{
{ "USERNAME", username },
{ "PASSWORD", Random.RandomString(30) },
{ "name", username }
};
return meta;
}
private static IDictionary<string, string> CreateAuthParameters(string username)
{
var authParams = new Dictionary<string, string>
{
{ "USERNAME", username },
{ "PASSWORD", Random.RandomString(30) },
{ "email", "test@gmail.com" }
};
return authParams;
}
private CognitoUser CreateCognitoUser(string username)
{
var provider =
new AmazonCognitoIdentityProviderClient(new AnonymousAWSCredentials(), RegionEndpoint.APNortheast1);
var userPool = new CognitoUserPool(Settings.POOL_ID, Settings.CLIENT_ID, provider);
return new CognitoUser(username, Settings.CLIENT_ID, userPool, provider);
}
public async Task<string> Signup(string username)
{
var user = this.CreateCognitoUser(username);
var authRequest = new InitiateCustomAuthRequest()
{
ClientMetadata = this.CreateClientMetadata(username),
AuthParameters = this.CreateAuthParameters(username)
};
var authResponse = await user.StartWithCustomAuthAsync(authRequest).ConfigureAwait(false);
}
lambda code
import { CognitoUserPoolTriggerHandler } from 'aws-lambda';
export const handler: CognitoUserPoolTriggerHandler = async event => {
if (!event.request.session || !event.request.session.length) {
event.request.userAttributes.email
}
}
Amazon.Runtime.AmazonServiceException: Unable to get IAM security credentials from EC2 Instance Metadata Service.
at Amazon.Runtime.DefaultInstanceProfileAWSCredentials.FetchCredentials()
at Amazon.Runtime.DefaultInstanceProfileAWSCredentials.GetCredentials()
at Amazon.Runtime.DefaultInstanceProfileAWSCredentials.GetCredentialsAsync()
at Amazon.Runtime.Internal.CredentialsRetriever.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.MetricsHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Extensions.CognitoAuthentication.CognitoUserPool.FindByIdAsync(String userID)
at Amazon.AspNetCore.Identity.Cognito.CognitoUserStore`1.FindByIdAsync(String userId, CancellationToken cancellationToken)
at Amazon.AspNetCore.Identity.Cognito.CognitoUserManager`1.FindByIdAsync(String userId)
at Amazon.AspNetCore.Identity.Cognito.CognitoSignInManager`1.PasswordSignInAsync(String userId, String password, Boolean isPersistent, Boolean lockoutOnFailure)
Question for you fine folks: I'm writing a .NET Core 3.1 console app (C#) with a custom DynamoDB property converter that implements Amazon.DynamoDBv2.DataModel.IPropertyConverter
. It works as expected when I tag my POCO class using Amazon.DynamoDBv2.DataModel.DynamoDBPropertyAttribute
:
namespace MyStuff
{
using System;
using System.Collections.Generic;
using Amazon.DynamoDBv2.DataModel;
public class Dashboard
{
[DynamoDBProperty(typeof(WidgetConverter))]
public List<Widget> Widgets { get; set; }
}
}
Is it possible to wire up the custom DynamoDB property converter without tagging up my POCO class property using the DynamoDBProperty
attribute? I've seen some code snippets that add mappings via the context, but I've been unable to get any of them to work.
Hey, hoping you can help - I've cloned the repo from master and am getting the following exception when running the tests:
The value of the property 'type' cannot be parsed. The error is: The type 'AWSSDK_DotNet.IntegrationTests.Tests.DynamoDB.DynamoDBTests+Employee, AWSSDK.IntegrationTestUtilities.Net35' cannot be resolved.
Is there a Getting started guide I can refer to
Hey room, found a pretty big bug in the AWS SDK. The model generator is not correctly handling nullable types across all products. This could be creating transient errors or silent failures on your calls into the SDK across the entire platform. Just trying to get more visibility on it.
Hello - I'm using the CognitoIdentity SDK, I do not see where I can set the expiration of AWS Credentials.
I am using a two step process:
GetOpenIdTokenForDeveloperIdentity(),
GetCredentialsForIdentity()
I can only set the expiration on the OpenIdToken (1st method), but do not see where to set the expiration for the credentials method (2nd method)
Thank you in advanced for suggestions.