Skip to content

Why auth request can be accessed only by guests? #1494

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

You must be logged in to vote

The /apis/collections/:collection/auth-with-password endpoint requires the user to be "guest", aka. to NOT have Authorization: TOKEN header with the request.

How can I disable this behavior?

There is no easy way to change it. One workaround could be to register a middleware and intercept the /auth-with-password action.

Is there a good reason for this?

It just seems logical to me. Additionally it also prevents accidentally "overwriting" your pb.authStore state after a successful auth call.

I can change it, but I'm not sure that I understand the use case. Could you elaborate a little more what you are trying to do and what is the end goal (pseudo-code is also ok)?

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by teenjuna
Comment options

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

@teenjuna
Comment options

@teenjuna
Comment options

@ganigeorgiev
Comment options

@teenjuna
Comment options

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