Closed sanasz91mdev closed 1 year ago
@sanasz91mdev Good morning. Are you using external provider to signing in? Please refer existing feature request https://github.com/aws/aws-aspnet-cognito-identity-provider/issues/225 if it matches your use case.
@sanasz91mdev Good morning. Are you using external provider to signing in? Please refer existing feature request #225 if it matches your use case.
No it doesn't... the signinasync successfully signs in but does not persist cookie due to which user.isAuthenticated is always false in .net 7 asp.ner core
@sanasz91mdev Good morning. Are you using external provider to signing in? Please refer existing feature request #225 if it matches your use case.
No it doesn't... the signinasync successfully signs in but does not persist cookie due to which user.isAuthenticated is always false in .net 7 asp.ner core
@sanasz91mdev Good afternoon. I do we missing block below after app.UseAuthentication()
:
app.UseEndpoints(endpoints =>
{
endpoints.MapRazorPages();
});
Most of the online code samples and issues related to User.Identity.IsAuthenticated
have been solved by online community by correcting the order of:
app.UseAuthentication();
app.UseAuthorization();
Thanks, Ashish
This issue has not received a response in 5 days. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.
Most of the online code samples and issues related to
User.Identity.IsAuthenticated
have been solved by online community by correcting the order of:
@ashishdhingra I use the same order ... still it does not update the User.Identity.IsAuthenticated ..
This issue has not received a response in 5 days. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.
please re open issue as it still persis
Describe the bug
Hi, i am using oidc for federated identity (sign up with SAML) and AddCognitoIdentity for custom sign up and sign in in one single application
i have a signin with microsoft option to which i redirect as follows:
and i also have a custom login and sign up page where i use custom attributes to sign up and email, password to login
The problem is that either of these flows are unable to persist any auth cookie in .net despite of successful authentication from SAML/cognito. Callback URL is also invoked.
The following always returns false, even after next redirect:
if (User.Identity.IsAuthenticated)
This always returns successful sign in , but persists nothing in cookie and
User.Identity.IsAuthenticated
alwaysfalse
Am i doing something wrong? Because i followed the entire documentation
Expected Behavior
if (User.Identity.IsAuthenticated)
should return true
Current Behavior
if (User.Identity.IsAuthenticated)
returning false even after successful authentication
Reproduction Steps
You can take code as described in description
Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
amazon.aspnetcore.identity.cognito 3.0.1
amazon.extensions.cognitoauthentication 2.5.1
microsoft.aspnetcore.authentication.openidconnect 6.0.13
Targeted .NET Platform
.NET 7
Operating System and version
Windows 10