Access groups are sometimes empty

Hey!

This is my first time using Sygnal Attributes, it was really easy to setup for someone who isn’t a developer!

Once a user logs in for the first time I’m directing them to /subscribe to purchase a membership (basic or pro), because I can only gate a page not content I’ve setup two pages, /dashboard/basic and /dashboard/pro. Once you checkout you’re redirected to /dashboard, that’s where I’m using Sygnal Attributes to detect if a user has either a basic or pro membership then redirect them to the correct page.

A lot of the time this works well, but there’s quite a few occasions where Sa5User will get all of the user info but the access_groups array is empty and access_groups is set to false, even though the user has a membership. I’ve attached a screenshot where you can see the account page shows this user has a pro membership but in the console the access_groups is still false.

Read-only link: Webflow - Mission Kitchen

Staging link: https://mission-kitchen-staging.webflow.io

Any help would be massively appreciated :heart:!
I’m also using the Beta version of Attributes, not sure if that’s important to mention.

I wasn’t able to add any more images or links to that so I’ve added them below:

Here’s an example of when it works:

On the /dashboard page where I’m doing the redirect this is the code I’m using:


This is what I’ve got in the global site head:

Two possibilities to check, plus a third option for a more advanced build.

Checking the data-load state;

Hey Michael, thanks so much for the speedy response.

Yeah so your first assumption was the same as mine, so after a successful purchase I direct users to a confirmation page saying please sign out and log back in for your membership to be updated.

This is what the flow currently looks like:

  • User signs up
  • Activates their email
  • Gets redirected to /subscribe
  • Picks a basic or pro plan and goes through the checkout process
  • Lands on the checkout confirmation page where we ask them to sign out
  • One they sign back in again they’re redirected to /dashboard
  • In the head of /dashboard I do the check with a 2500ms delay to see if they have an access group, if true they get redirected to /dashboard/basic or /dashboard/pro, if false then they’re taken back to /subscribe.

It’s just sometimes even after a purchase and sign out > login they still get taken to /subscribe, I can tell the membership is active because the purchase button will be disabled.

Yeah I’d love to hear more about that and discuss the pricing with the client, is it a lot more complex to setup?

Thanks again!
Ollie.

Ah that was another thing I thought I should mention, after logging out and back in again the user could access the /dashboard/pro page if they went there directly but on the /dashboard page where I was checking if access groups was true it was still returning false and redirecting them to the account page.

Sounds like a solid flow overall, however you don’t need a delay, the SA5 event will indicate when access groups are loaded-

I can’t guess anything else without digging into your project to identify whether it’s a setup issue or some form of Webflow data issue. I’m seeing a couple of reports in the main forum that some users are seeing weird behavior where AG’s don’t always appear in the admin console. I haven’t seen anything on our client sites, but… I guess anything is possible.

Yes and no. It simplifies things significantly for your site code, and you can eliminate the logout and log-back-in after subscription. Just redirect them to the dashboard, the new AG data will already be loaded.

It’s about $300 to setup, and the site install involves-

  • new DNS setup, I’ll help with the migration
  • reverse proxy setup
  • some integration via the WF API

Alternatively I could help you debug your site setup and track down the issue, which would take less time, but in micro-consulting, the smallest package is $295 so you’d likely have a good deal of time left for other things when you need them.