Ash Authentication ApiKey strategy
How is the correct way to create a ApiKey to be used for users.
https://gist.github.com/phsacramento/ad22e42fb4c357d99b694fb8ed511b52
On this example, i'm not able to get generated ApiKey using Api's request.
3 Replies
You can add
metadata :plaintext_api_key, :string, allow_nil?: false
ah, actually it may only be AshGraphql that supports this
You can add a metadata
function to expose route metadata
something like thatSo, using REST with ApiKey only will not work?
No you can do it
You just might have to do one of two things:
1. use that metadata example I gave above, that adds the api key to metadata
2. write a custom generic action that returns the api key and hook that up.