Skip to content

Commit

Permalink
small copy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgomes committed Oct 7, 2024
1 parent a6a78dd commit fd08f96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@ clearTimeout(timeout);

### `authToken: string | (() => Promise<string> | string)`

The `authToken` option can be passed to `neon(...)` to set the `Authorization` header for the `fetch` request. This allows seamless integration with third-party authentication systems, which ultimately allows for secure, authenticated requests to Neon, ensuring that access control and authorization are managed effectively across different systems.
The `authToken` option can be passed to `neon(...)` to set the `Authorization` header for the `fetch` request. This allows you to authenticate database requests against third-party authentication providers. So, this mechanism can be used to ensure that access control and authorization are managed effectively across different systems.

Example of usage:

```typescript
import { neon } from '@neondatabase/serverless';
// Retrieve the JWT token (implementation depends on your auth system)
const authToken = getAuthToken();
// Initialize the Neon client with connection string and auth token
// Initialize the Neon client with a connection string and auth token
const sql = neon(process.env.DATABASE_URL, { authToken });
// Run a query
const posts = await sql('SELECT * FROM posts');
Expand Down

0 comments on commit fd08f96

Please sign in to comment.