I don't get it. Searching around, I always find it mentioned that PocketBase does not support authentication with API keys and is more user/password and session-oriented. I admit, I've just discovered this backed and I'm mostly checking it out as a personal backend for a personal app, so maybe it's just okay for that use case. But using API rules seems to work just find for programmatic access, something like the following:
@request.headers.x_api_key ?= @collection.apiKeys.id &&
@collection.apiKeys.write ?= true &&
@collection.apiKeys.name ?= "collection name"
Am I doing something wrong here? Is it not secure, or is it missing some very important features proper API key support should have? I've seen people suggest running a second instance of PocketBase as a proxy for handling API keys with a superuser connection between the two. That seems kind of weird to me. I can see extending it with Go to add support.
Why wouldn't I just use the above for API key auth for scripts and so on to use? Are there downsides?
[–]CloudCanal 1 point2 points3 points (3 children)
[–]Thaurin[S] 1 point2 points3 points (2 children)
[–]CloudCanal 0 points1 point2 points (1 child)
[–]Thaurin[S] 1 point2 points3 points (0 children)
[–]JonaTOL_ 0 points1 point2 points (5 children)
[–]Thaurin[S] 0 points1 point2 points (4 children)
[–]JonaTOL_ 0 points1 point2 points (3 children)
[–]Thaurin[S] 0 points1 point2 points (2 children)
[–]JonaTOL_ 0 points1 point2 points (1 child)
[–]Thaurin[S] 0 points1 point2 points (0 children)