simov / grant

OAuth Proxy
MIT License
4.1k stars 257 forks source link

Provide a handler for Netlify functions #243

Open gearoidgit opened 3 years ago

gearoidgit commented 3 years ago

It seems I can force the AWS handler to work for Netlify by setting the event.version = '1.0' in the function but I have not done extensive testing to see if other required event properties that are missing will cause problems. Having a Netlify specific handler would be nice. Netlify's functions run on AWS.

simov commented 3 years ago

Thanks, that's a good suggestion. That was the exact reason why I decided not to create an explicit handler for Netlify, but I can do some testing on my own and see how that goes.

gearoidgit commented 3 years ago

For reference I just set the event.version in my functions

exports.handler = async (event) => {
...
event.version = '1.0'
...
}