Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transition from non-authorized to authorized does not update collection content #27

Closed
glenne opened this issue Jun 30, 2019 · 1 comment

Comments

@glenne
Copy link

glenne commented Jun 30, 2019

I have a collection that requires an authenticated login to access. When I first view the collection in an un-authenticated state I of course do not get any content. If I subsequently authenticate, I expect the collection to populate with contents so useCollection will 'refresh'. However, this does not occur.

Is there a technique I can use to force useCollection to refresh content?

@chrisbianca
Copy link
Contributor

@glenne sorry for the slow response. You're right and unfortunately this is the behaviour of the underlying SDK so there's not really anything that can be done in the library to resolve this automatically.

I'd suggest that you simply don't try and load the collection if the user is not authenticated. You could achieve this by only mounting the component that calls useCollection when the user is authenticated?

I'm going to close the issue as it's not something that can be fixed by the library, but I'm happy to help you work through the above suggestion if needs be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants