Neon DB
Authenticate with NeonDB api using JSON Web Tokens
You can configure UseGrant as a auth provider in NeonDB and use the generated access token to authenticate with the NeonDB api.
Follow the steps below to configure UseGrant as a auth provider in NeonDB.
- Go to the NeonDB console and navigate to the "Settings" page.
- Click on the
Authorize
tab. - Click on the
Setup authentication provider
button. - Enter the jwk url of your UseGrant application. If you have a custom domain,
you can also use that domain instead of the default one.
- Example:
https://MY_PROJECT_URL_ID.usegrant.dev/.well-known/jwks
- Example:
- Add the audience of your UseGrant application.
- Example:
api.neon.tech
or whatever you set in theaudience
field while creating the client.
- Example:
- Click on the
Save
button.
Once you have completed the steps above, you should be able to authenticate with the NeonDB api using the generated access token.
Follow the NeonDB docs for more information on how to use the NeonDB api. A typical example would look like this: