- Summary
Netlify supports automatically triggering Netlify Functions called identity-validate, identity-signup, andidentity-login when those events occur in Gotrue. We could also like to support background functions, eg identity-validate-background. That means there can be multiple functions that should be triggered for each event. This PR updates Gotrue to support a list of functions that should be triggered when each event occurs.
GoTrue currently gets function hooks in the following form:
I liked it better too, but it turns out ["identity-signup"] actually matches to []interface{}, not []string, and then it's necessary to make an additional assertion about every member of the list.
- Summary Netlify supports automatically triggering Netlify Functions called
identity-validate
,identity-signup
, andidentity-login
when those events occur in Gotrue. We could also like to support background functions, egidentity-validate-background
. That means there can be multiple functions that should be triggered for each event. This PR updates Gotrue to support a list of functions that should be triggered when each event occurs.GoTrue currently gets function hooks in the following form:
This PR additionally supports this form:
Reviewing this PR by commit may be helpful.
- Test plan Going to run some tests in staging tomorrow, will update here with details.
identity-validate
etc. still workidentity-validate-background
will require additional changes to other services.- Description for the changelog Support triggering multiple function hooks per event.
- A picture of a cute animal (not mandatory but encouraged)![tiger](https://user-images.githubusercontent.com/1887071/97117627-2f6bea00-16c2-11eb-82db-7aa61f6a249d.jpeg)