Skip to content

How can I ensure that only requests with valid tokens are accepted? #20

Answered by maennchen
alishir asked this question in Q&A
Discussion options

You must be logged in to vote

@alishir We currently do not offer a plug to check if an authorization exists, only if it is valid.

For a lot of APIs, no auth is also valid and the result might just depend on if you’re logged in.

You‘ll therefore have to create your own plug to protect routes.

If you‘d like, I‘d be open for a PR that adds a new plug that does this.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@alishir
Comment options

@maennchen
Comment options

Answer selected by maennchen
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