https://github.com/mathieudutour/pkce-proxy
A barebones proxy to enable the PKCE flow for OAuth providers that do not support PKCE.
https://github.com/mathieudutour/pkce-proxy
oauth2 pkce
Last synced: 7 months ago
JSON representation
A barebones proxy to enable the PKCE flow for OAuth providers that do not support PKCE.
- Host: GitHub
- URL: https://github.com/mathieudutour/pkce-proxy
- Owner: mathieudutour
- License: mit
- Created: 2022-05-06T15:57:07.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-23T14:21:56.000Z (over 1 year ago)
- Last Synced: 2025-02-28T19:19:32.536Z (7 months ago)
- Topics: oauth2, pkce
- Language: TypeScript
- Homepage:
- Size: 93.8 KB
- Stars: 12
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PKCE Proxy for Raycast
A barebones proxy to enable the PKCE flow for OAuth providers that do not support PKCE.
The proxy server has been tested with Notion but it may need some tweaks to adapt it to another provider.
## Configuration
The proxy uses environment variables to be as versatile as possible. You will need to provide a few for it to work.
Here is an example using [Notion](https://notion.so) as the provider:
```
PROXY_HOSTNAME=https://your-proxy-domain
CLIENT_SECRET=client-secret-provided-by-notion
AUTHORIZE_URL=https://api.notion.com/v1/oauth/authorize
TOKEN_URL=https://api.notion.com/v1/oauth/token
```If the provider supports refreshing tokens and the endpoint to refresh tokens is different from `TOKEN_URL`, you can specify `REFRESH_TOKEN_URL`.
If the provider expects the body of requests to be form encoded instead of JSON, you can set the `JSON_OR_FORM` to `"form"`.
## Running Locally
```sh
npm install
npm run build
npm start
```The proxy should now be running on [localhost:5000](http://localhost:5000/).
## Deploying to Heroku
[](https://heroku.com/deploy)
or
Make sure you have the [Heroku CLI](https://cli.heroku.com/) installed.
```
heroku create
git push heroku main
heroku open
```## Documentation
For more information about OAuth with Raycast, see:
- [Raycast developer documentation](https://developers.raycast.com/api-reference/oauth)
- [Raycast extension using this proxy](https://github.com/raycast/extensions/tree/main/extensions/notion)