simov / grant

OAuth Proxy
MIT License
4.08k stars 257 forks source link

Grant playground open-source? #299

Open endel opened 7 months ago

endel commented 7 months ago

Hi @simov, I hope you're having a great start of 2024 ☺️

Would you consider making the source of your Grant Playground available?

The reason I ask this is because I'd love to create type definitions for each provider's options via TypeScript. As you have most of the configurations (if not all) per provider there, like scope and additional properties. It would be really nice to offer auto-completion for scope and other options per provider.

If possible if you can share only those configurations that'd be already perfect!

(PS: I've recently released Colyseus Auth module that includes OAuth via your grant package 🤗 )

simov commented 7 months ago

Hi, I'm glad that it worked out for you, your project is looking great.

As mentioned in this issue https://github.com/simov/grant/issues/61 the source code of the OAuth Playground is not that interesting to begin with and reproducing its functionality would hardly be a mystery, I'm giving some pointers in that thread.

The configuration for the OAuth Playground can be found here: https://grant.outofindex.com/providers. Scopes are pulled separately for each provider that has them: https://grant.outofindex.com/scopes/google

However, here is the problem, this configuration is not guaranteed to be correct. As you can imagine there is no agreed upon standard structure for any of those options and the developer documentation for each one of these providers is quite different, sometimes involves reading multiple pages and so on. So keeping that configuration up to date for 200+ providers could prove to be a job on its own. So I'd be hesitant to put such information in an auto-complete format where people would expect that to be 100% correct and they will never look at the actual documentation.