Skip to content

Auth0 FDW API Key #459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
shaked-hadas opened this issue May 8, 2025 · 6 comments
Open

Auth0 FDW API Key #459

shaked-hadas opened this issue May 8, 2025 · 6 comments
Labels
bug Something isn't working

Comments

@shaked-hadas
Copy link

Hi
I’m trying to configure Supabase’s Auth0 FDW as outlined in the documentation.

According to the guide, the extension requires an “Auth0 API Key or PAT”. However, Auth0 doesn't supports creating Personal Access Tokens (PATs), and to interact with the Management API, a valid access token must be obtained through a client credentials flow — meaning the wrapper itself needs to request the token using the appropriate client ID, secret, and audience.

Has anyone successfully configured this FDW under these constraints?

If the wrapper currently lacks support for programmatic token retrieval, are there any recommended workarounds?

Thanks!

@shaked-hadas shaked-hadas added the bug Something isn't working label May 8, 2025
@burmecia
Copy link
Member

Auth0 FDW doesn't support OAuth at the moment, so it cannot request programmatic token. You can try Auth0 management API token instead, it can be found in the Applications -> APIs -> Auth0 Management API -> API explorer.

Image

@shaked-hadas
Copy link
Author

shaked-hadas commented May 21, 2025

Thank you for your answer!
I tried it, and I received this error when querying the table

Image

Also, given the token expiration (as defined in the attached image) and the 1-month maximum lifespan, do I need to manually replace the token monthly? This seems impractical.

@burmecia
Copy link
Member

I've tested on my account and it works fine. Can you confirm used correct url and api_key option when creating the foreign server? You can run the SQL in SQL Editor, rather than using GUI. The foreign table DDL should be like below:

create server auth0_server
  foreign data wrapper auth0_wrapper
  options (
    url 'https://dev-xxx.au.auth0.com/api/v2/users',
    api_key_id '<secret id in Vault>'
  );

@shaked-hadas
Copy link
Author

Configuring it using SQL instead of the GUI indeed made it work! thanks!
What about the token expiration? Is there any way to maintain it better than manually replacing it every month?

@burmecia
Copy link
Member

Currently there is no automatic way to handle token expiration, so we have to replace it every month. We will do some evaluation and research to see if possible to add OAuth support in Wrappers, hopefully in the next several months.

@shaked-hadas
Copy link
Author

Ok, thank you very much for your responses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants