Hello everyone,
I’m using faunaDB as database for my SaaS product (eCommerce business). I have an architecture where :
-
I create a child database for each eCommerce shop (tenant) , all those databases have the same GraphQL schema.
-
A user may have access to multiple databases (for example an agency that manages multiple eCommerce shops)
I want to leverage the access provider capability of faunadb to authenticate users with Auth0 access Token, but, the problem is :
-
Auth0 dosen’t allow the modification of the
audience
attribute, so we can set the one corresponding to the target database when generating the token. -
If I create an API (audience) in Auth0 for each of my databases, the whole list will be added to the audience attribute which is not what I want, because in that case , the user will have access to all databases.
Is it possible that faunaDB verify the JWT without checking the audience ? for example the verification could be done on a predefined scope