Is there built-in solution in AshAuthentication to support user created api keys?

Hey all, I was wondering if there is a built-in solution in AshAuthentication to support user created api keys to allow access to some API in an Ash resource (in my case, using AshGraphql).

I thought about using JWT, but it was not clear to me if I would be able to create multiple tokens for the user and also if AshAuthentication would keep them persistend into the User resource or it would just validate the token (meaning that I can’t revoke them).

1 Like

Not currently no :slight_smile: You could either create a custom auth strategy or implement your own system that leverages the user resource but has its own api token resource backing the access.

Ah, I see, I will read this documentation about creating custom strategies and see if I can come up with something Defining Custom Authentication Strategies — ash_authentication v4.5.3 :slight_smile: