5 ms·
> Custom OAuth implementation with user registration/login Please don't. At 2 minute glance you are allowing empty state (csrf) and bearer tokens in query stri
by haxton 1y ago
> Custom OAuth implementation with user registration/login
Please don't. At 2 minute glance you are allowing empty state (csrf) and bearer tokens in query string[0], not checking if token is expired or not[1], storing secrets in plain text / not salting[2], missing PKCE Validation, debug mode always on, redirect URL only checking if includes (127.0.0.1.evil.com works)[3] so much...
Please, please, please don't recommend this for any production usage.
[0] https://github.com/f/mcp-cloudflare-boilerplate/blob/master/src/auth/oauth2.ts#L274-L275 https://github.com/f/mcp-cloudflare-boilerplate/blob/master/...
[1] https://github.com/f/mcp-cloudflare-boilerplate/blob/master/src/auth/oauth2.ts#L37 https://github.com/f/mcp-cloudflare-boilerplate/blob/master/...
[2] https://github.com/f/mcp-cloudflare-boilerplate/blob/master/src/auth/oauth2.ts#L127 https://github.com/f/mcp-cloudflare-boilerplate/blob/master/...
[3] https://github.com/f/mcp-cloudflare-boilerplate/blob/master/src/auth/handlers/oauth.ts#L327 https://github.com/f/mcp-cloudflare-boilerplate/blob/master/...
- fka 1y agoThank you for bringing these out. It’s just an initial version and a boilerplate, so it’s waiting for PRs to make it production-ready. Hope to see someone opens PRs to fix these issues and make it better.