Skip to content

fail to expand field and update appstate (Dart / Flutterflow) #4872

Closed Answered by ganigeorgiev
WDuyv asked this question in Q&A
Discussion options

You must be logged in to vote

I'm confused.

If I set the API rules to @request.auth.id = "" I can access without problem, so at least that means I am authenticated, right?

No. When the auth id is equal to an empty string/null then this means that your rule allow only acces to non-authenticated users. If you want to grant access to only authenticated users you need to negate the operator - aka . @request.auth.id != "".

If I change the API rules to @request.auth.id = user.id I can't access them, although I am logged in as that user and it was created by that user.

Are you sure that you are actually logged in? From your initial code sample you are creating a new PocketBase instance before sending the request and pb.a…

Replies: 2 comments 12 replies

Comment options

You must be logged in to vote
12 replies
@ganigeorgiev
Comment options

@WDuyv
Comment options

@WDuyv
Comment options

@ganigeorgiev
Comment options

Answer selected by WDuyv
@WDuyv
Comment options

@WDuyv
Comment options

@WDuyv
Comment options

@ganigeorgiev
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants