Quantcast
Channel: Customized Commerce 13 and earlier versions
Viewing all articles
Browse latest Browse all 9642

The Edit Page icon doesn't show up even though federated login works

$
0
0
Hi,
I have configured SAML2 for login, and it works but "Edit page" doesn't show up. Going from login page ([Authorize] in the controller), redirecting to AD FS IDP, back to /Saml2/Acs and then to the login page. The login page shows normally, but no "Edit page" button shows.
I can see that I have valid claims (in the controller) via:
var userClaims = User.Claims.Select(c => new { c.Type, c.Value }).ToList();
In Optimizely admin "Set Access Rights", I have a bunch of roles, and they match those in my user claims.
In my configuration I have:
.AddCookie(options =>
	{
		options.ExpireTimeSpan = TimeSpan.FromDays(2);
		options.Events.OnSignedIn = async ctx =>
		{
			if (ctx.Principal?.Identity is ClaimsIdentity claimsIdentity)
			{
				var synchronizingUserService = ctx
				  .HttpContext
				  .RequestServices
				  .GetRequiredService<ISynchronizingUserService>();
				await synchronizingUserService.SynchronizeAsync(claimsIdentity);
			}
		};
	}
)

I am assuming the above code cookie-code would synchronize the claims I have from the AD FS server with the access rights in Optimizely. Claims I have from server has admin priveleges in "Access rights" in Optimizely.

The code is up on server on DXP, so I have limited logging capabilities (there are no errors logged). Anyone has a hunch of what could be wrong or how to troubleshoot in a effective way?
/ Tony

Viewing all articles
Browse latest Browse all 9642

Trending Articles