Skip to content

Commit

Permalink
Auth token and docs (#7)
Browse files Browse the repository at this point in the history
* oauth example app

* get token auth

* auth examples

* auth tests

* auth token with rate limiting

* auth example with nextjs

* fix dependencies

---------

Co-authored-by: Nico Bistolfi <[email protected]>
  • Loading branch information
nicobistolfi and nicobistolfi authored Sep 3, 2024
1 parent 4df0080 commit 7b25abc
Show file tree
Hide file tree
Showing 47 changed files with 5,984 additions and 778 deletions.
16 changes: 7 additions & 9 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
# OAuth 2.0 / OpenID Connect Configuration
OIDC_ISSUER=https://accounts.google.com
OAUTH_CLIENT_ID=your_oauth_client_id
OAUTH_CLIENT_SECRET=your_oauth_client_secret
OAUTH_REDIRECT_URL=http://localhost:8080/auth/callback
# TOKEN CONFIGURATION
TOKEN_URL=http://localhost:8080/api/v1/token

# JWT Configuration
JWT_SECRET=your_jwt_secret_key
JWT_EXPIRATION_MINUTES=60

# API Key Configuration
VALID_API_KEY=your_api_key

# Server Configuration
PORT=8080

Expand All @@ -34,4 +28,8 @@ RATE_LIMIT_REQUESTS=10
RATE_LIMIT_DURATION=1s

# Other Configuration Options
# Add any other environment-specific configurations here
# Add any other environment-specific configurations here


# Allowed Origins
ALLOWED_ORIGINS=https://example.com,https://api.example.com
12 changes: 0 additions & 12 deletions docs/blog/2019-05-28-first-blog-post.md

This file was deleted.

44 changes: 0 additions & 44 deletions docs/blog/2019-05-29-long-blog-post.md

This file was deleted.

24 changes: 0 additions & 24 deletions docs/blog/2021-08-01-mdx-blog-post.mdx

This file was deleted.

Binary file not shown.
29 changes: 0 additions & 29 deletions docs/blog/2021-08-26-welcome/index.md

This file was deleted.

23 changes: 0 additions & 23 deletions docs/blog/authors.yml

This file was deleted.

19 changes: 0 additions & 19 deletions docs/blog/tags.yml

This file was deleted.

1 change: 1 addition & 0 deletions docs/docs/auth/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: Authentication
17 changes: 0 additions & 17 deletions docs/docs/auth/apikey.md

This file was deleted.

Loading

0 comments on commit 7b25abc

Please sign in to comment.