Activities of "liangshiwei"

Hi,

can you add / to redirect_uri

Hi,

okay

Test is configured using the Production Redis db for now so that I can keep everything consistent for troubleshooting.

Don't use Production Redis db for Test env.

I think it's related to the session check.

you can try this to check if it's works:

[ExposeServices(typeof(IdentitySessionChecker))]
public class MyIdentitySessionChecker : IdentitySessionChecker
{
    public MyIdentitySessionChecker(IOptions<AbpClaimsPrincipalFactoryOptions> abpClaimsPrincipalFactoryOption, IdentitySessionManager identitySessionManager, IDistributedCache<IdentitySessionCacheItem> cache, IClock clock, IWebClientInfoProvider webClientInfoProvider, IOptions<IdentitySessionCheckerOptions> options) : base(abpClaimsPrincipalFactoryOption, identitySessionManager, cache, clock, webClientInfoProvider, options)
    {
    }

    public override Task<bool> IsValidateAsync(string sessionId)
    {
        return Task.FromResult(true);
        //return base.IsValidateAsync(sessionId);
    }
}

Hi,

you can use CSS to change the style without any problem.

Sorry, I don't know what exact question is

Could you please share a minimal reproducible project with me? i will check it.

shiwei.liang@volosoft.com

Hi,

I just think there is something wrong with your project structure.

For Auth Server Separated solution, the Blazor.Server project should not rely on Volo.Abp.Identity.Pro.Domain project.

Hi

If session is not null, then the check will pass

Hi,

could you please share the full logs?

Hi,

sure, please email me. i will share it with you.

shiwei.liang@volosoft.com

BTW, you can download it via ABP CLI abp get-source Volo.Saas

Hi,

You can override the IdentitySessionManager to debug it step by step.

[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IdentitySessionManager))]
public class MyIdentitySessionManager : IdentitySessionManager
{
    public MyIdentitySessionManager(IIdentitySessionRepository identitySessionRepository, ICurrentUser currentUser, IDistributedCache<IdentitySessionCacheItem> cache, ISettingProvider settingProvider, IdentityDynamicClaimsPrincipalContributorCache identityDynamicClaimsPrincipalContributorCache) : base(identitySessionRepository, currentUser, cache, settingProvider, identityDynamicClaimsPrincipalContributorCache)
    {
    }
    
    public override async Task<IdentitySession> FindAsync(Guid id)
    {
        return await UpdateSessionFromCacheAsync(await IdentitySessionRepository.FindAsync(id));
    }

    public override async Task<IdentitySession> FindAsync(string sessionId)
    {
        return await UpdateSessionFromCacheAsync(await IdentitySessionRepository.FindAsync(sessionId));
    }
    
    protected override async Task<IdentitySession> UpdateSessionFromCacheAsync([CanBeNull] IdentitySession session)
    {
        if (session == null)
        {
            return null;
        }

        var sessionCacheItem = await Cache.GetAsync(session.SessionId);
        if (sessionCacheItem != null && await UpdateSessionFromCacheAsync(session, sessionCacheItem))
        {
            await IdentitySessionRepository.UpdateAsync(session);
        }

        return session;
    }

    protected override Task<bool> UpdateSessionFromCacheAsync(IdentitySession session, IdentitySessionCacheItem sessionCacheItem)
    {
        if (session == null)
        {
            return Task.FromResult(false);
        }

        if (sessionCacheItem == null)
        {
            return Task.FromResult(false);
        }

        var changed = false;
        if (sessionCacheItem.CacheLastAccessed != null && (session.LastAccessed == null || sessionCacheItem.CacheLastAccessed > session.LastAccessed))
        {
            session.UpdateLastAccessedTime(sessionCacheItem.CacheLastAccessed);
            changed = true;
        }

        if (!sessionCacheItem.IpAddress.IsNullOrWhiteSpace())
        {
            var ipAddresses = session.GetIpAddresses().ToList();
            ipAddresses.RemoveAll(x => x == sessionCacheItem.IpAddress);
            ipAddresses.Add(sessionCacheItem.IpAddress);
            session.SetIpAddresses(ipAddresses);
            changed = true;
        }

        return Task.FromResult(changed);
    }
}
Showing 301 to 310 of 5968 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11