# Access groups are sometimes empty

**URL:** <https://sygnal-attr.discourse.group/t/access-groups-are-sometimes-empty/156>\
**Category:** Support\
**Created:** [January 17, 2024, 2:07pm UTC](https://sygnal-attr.discourse.group/t/access-groups-are-sometimes-empty/156 "2024-01-17T14:07:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wodco](https://yyz2.discourse-cdn.com/free1/user_avatar/sygnal-attr.discourse.group/wodco/32/92_2.png) [@wodco](https://sygnal-attr.discourse.group/u/wodco)\
**Post date:** [January 17, 2024, 2:07pm UTC](https://sygnal-attr.discourse.group/t/access-groups-are-sometimes-empty/156/1 "2024-01-17T14:07:20Z")

</div>

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.

 ![Screenshot 2024-01-17 at 9.40.30 AM](https://global.discourse-cdn.com/free1/uploads/sygnal_attr/original/1X/c555b75b5ec75f1e867097884b87cb21c0742cb2.jpeg)

Read-only link: [Webflow - Mission Kitchen](https://preview.webflow.com/preview/mission-kitchen-staging?utm_medium=preview_link&utm_source=designer&utm_content=mission-kitchen-staging&preview=b456af3e8a4166a14928f508fab92498&workflow=preview)

Staging link: [https://mission-kitchen-staging.webflow.io](https://mission-kitchen-staging.webflow.io)

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

---

<div class="post-metadata">

**Author:** ![wodco](https://yyz2.discourse-cdn.com/free1/user_avatar/sygnal-attr.discourse.group/wodco/32/92_2.png) [@wodco](https://sygnal-attr.discourse.group/u/wodco)\
**Post date:** [January 17, 2024, 2:08pm UTC](https://sygnal-attr.discourse.group/t/access-groups-are-sometimes-empty/156/2 "2024-01-17T14:08:21Z")

</div>

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:

 ![Screenshot 2024-01-17 at 1.58.43 PM](https://global.discourse-cdn.com/free1/uploads/sygnal_attr/original/1X/1ab1001b982de80c1b5feccc1adfd14481ca7918.jpeg)

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

 ![](https://global.discourse-cdn.com/free1/uploads/sygnal_attr/original/1X/128cd47945a49f9771c6c1585a4aa85ceee2a92e.png)  
This is what I’ve got in the global site head:  
 ![](https://global.discourse-cdn.com/free1/uploads/sygnal_attr/original/1X/33353d428aa4a67caf2f31e890a0ba90741b0be8.png)

---

<div class="post-metadata">

**Author:** ![memetican](https://yyz2.discourse-cdn.com/free1/user_avatar/sygnal-attr.discourse.group/memetican/32/9_2.png) [@memetican](https://sygnal-attr.discourse.group/u/memetican)\
**Post date:** [January 19, 2024, 3:37am UTC](https://sygnal-attr.discourse.group/t/access-groups-are-sometimes-empty/156/3 "2024-01-19T03:37:37Z")

</div>

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

Checking the data-load state;

> **[Tips & Best Practices](https://attr.sygnal.com/sa5-user-accounts/logged-in-user-info/tips-and-best-practices)**
>
> Best Practices Using SA5's User Info Library

---

<div class="post-metadata">

**Author:** ![wodco](https://yyz2.discourse-cdn.com/free1/user_avatar/sygnal-attr.discourse.group/wodco/32/92_2.png) [@wodco](https://sygnal-attr.discourse.group/u/wodco)\
**Post date:** [January 19, 2024, 1:49pm UTC](https://sygnal-attr.discourse.group/t/access-groups-are-sometimes-empty/156/4 "2024-01-19T13:49:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![wodco](https://yyz2.discourse-cdn.com/free1/user_avatar/sygnal-attr.discourse.group/wodco/32/92_2.png) [@wodco](https://sygnal-attr.discourse.group/u/wodco)\
**Post date:** [January 19, 2024, 5:47pm UTC](https://sygnal-attr.discourse.group/t/access-groups-are-sometimes-empty/156/5 "2024-01-19T17:47:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![memetican](https://yyz2.discourse-cdn.com/free1/user_avatar/sygnal-attr.discourse.group/memetican/32/9_2.png) [@memetican](https://sygnal-attr.discourse.group/u/memetican)\
**Post date:** [January 27, 2024, 8:14am UTC](https://sygnal-attr.discourse.group/t/access-groups-are-sometimes-empty/156/6 "2024-01-27T08:14:26Z")

</div>

> [@wodco](#):
>
> 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.

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

> **[Tips & Best Practices](https://attr.sygnal.com/sa5-user-accounts/logged-in-user-info/tips-and-best-practices)**
>
> Best Practices Using SA5's User Info Library

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.

> [@wodco](#):
>
> Yeah I’d love to hear more about that and discuss the pricing with the client, is it a lot more complex to setup?

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.

> **[Webflow Micro-Consulting | Sygnal](https://www.sygnal.com/webflow)**
>
> Your own personal dev team, on-demand. We support web developers & designers worldwide, and fill the gaps for Webflow designers who are not experienced with code and complex Webflow solutions.
