Issues with user session not saving after upgrading to 5.10.0

No. This is my ConfigureAuth setup:

ok that’s weird, FromToken should be false then. That’s the reason why it wouldn’t be saved, but if you don’t have any other AuthProviders configured I don’t see how it’s being set to true.

Can you check if your HTTP Header includes the ss-tok cookie? Maybe you reused the same URL with another app that is using a stateless AuthProvider?

Can you clear your cookies just to make sure.

I am using Rider’s http feature. Here are the requests and responses.


Yeah I don’t see how it can be set to FromToken=true, which is only done in JWT or Identity Auth Providers AFAIK.

Can you see if you can try creating a FromToken property in your Custom AuthUserSession to see if we can see where it’s being set:

public class CustomAuthSession : AuthUserSession
{
    public new bool FromToken
    {
        get
        {
            return base.FromToken;
        }
        set
        {
            Console.WriteLine($"FromToken={value}");
            Console.WriteLine(Environment.StackTrace);
            base.FromToken = value;
        }
    }
}

And let me know what it prints out.

Nope, it doesn’t set, no print.

Here’s the content of CustomAuthSession, which is just the above class.

I’m assuming because it’s only shadowed and not overriding a virtual property which I’ve added in this commit.

If you upgrade to latest v6.6.1+ on MyGet you’ll be override it instead of shadowing it, but as you’re upgrading from v5.10 it may not be a drop-in upgrade. Although just upgrading to a newer version may just resolve it.

If you can debug it and find where it’s being set to true that will help identify if it’s still an issue with the latest version, otherwise you can just set it to false in your OnSaveSessionAsync() to get it to save the session or try upgrading to a newer version.

Yes, eventually I want to upgrade this project to the latest version, but there are other dependencies that need to be resolved. I will keep you updated. Thanks for your help! As usual, you were awesome and this is a great project :slight_smile:

1 Like

I think I found where the session.FromToken = true is getting set.

if (userAuth.Meta != null) session.PopulateFromMap(userAuth.Meta);

I do have Meta set for the user and therefore PopulateFromMap is setting the property as true. Screenshots attached.



ok this looks like an old issue fixed in 2020:

FYI first version with this fix is v5.10.4+

Ah! Upgraded to 5.14.0 and it works well! Might as well try going to v6. Any plans on supporting npgsql 7 soon?

Thanks!

Npgsql v7 is planned for release after next (i.e. v6.8).

1 Like

I started migrating to .net 6 and SS v6.2. Everything going smoothly but looks like I have something misconfigured. I’m getting 405 Method Not Found for existing service endpoints that were working under 5.14.0. Screenshots attached. Anything I’m overlooking? When I make a request with .json, the endpoints are available. You can see that in the last screenshot.



Whatever’s generating the URL is invalid, the 2 pre-defined routes for the URL should be either:

If you’re already using /api route for your own purposes you can disable it with:

ConfigurePlugin<PredefinedRoutesFeature>(feature => feature.JsonApiRoute = null);

Great! I updated the cli and client, regenerated the client side dtos. That worked!

Is UI Explorer available for the mvc project? When I navigate to http://localhost:5001/api/ui I get a blank screen and 404 for couple of JS files. One is from :8080?

This looks like you have an old pre-release version, can you clear your NuGet packages cache and download the latest v6.6.1+ on MyGet.

I’m having some issues with MyGet & v6.6.1. I downgraded to 6.6.0 from nuget and was able to get the UI. I’ll get back to you when I resolve it.

Thanks for your help!

I’ve redeployed to MyGet which looks like has all packages deployed, if you run into any issues on MyGet I’ve also deployed the pre-release packages to GitHub Packages.

v6.6.1 from MyGet worked this time, but still have 404 for /js/core.mjs

Are you just loading /locode to produce this error? It might still be stale/old NuGet packages. I can’t seem to reproduce when creating a new project and navigating to /locode or using any of the built in examples.