Skip to content

Feat 730 new webhook events - #737

Merged
eldadfux merged 21 commits into
0.7.xfrom
feat-730-new-webhook-events
Dec 3, 2020
Merged

eldadfux merged 21 commits into
0.7.xfrom
feat-730-new-webhook-events

Conversation

@eldadfux

Copy link
Copy Markdown
Member

What does this PR do?

Adds to new system events: account.recovery.create and account.recovery.update, the new event will allow to customize Appwrite password recovery process. The new event are supported for usage with both Appwrite webhooks and functions.

Test Plan

Added a new test class to check all Webhooks payload are sent as expected to any 3rd party HTTP server.

Related PRs and Issues

#730

Have you read the Contributing Guidelines on issues?

Yes.

@JulianBissekkou JulianBissekkou left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!
I am not sure were the actual event is send because my PHP skills are pretty bad tbh :P
Can you quickly tell me where the payload for those events are send?
I just want to make sure that i contains everything we need.
Thanks a lot ☺️

Comment thread app/config/events.php Resolved
@eldadfux

Copy link
Copy Markdown
Member Author

Nice!
I am not sure were the actual event is send because my PHP skills are pretty bad tbh :P
Can you quickly tell me where the payload for those events are send?
I just want to make sure that i contains everything we need.
Thanks a lot ☺️

This is the structure of the object passed as the request payload: https://github.com/appwrite/appwrite/blob/ea0f51a4dadb218b6c2f0127daf1aca7568e182f/src%2FAppwrite%2FUtopia%2FResponse%2FModel%2FToken.php after the new version will be released we'll also have this available in the website docs.

The request itself is being sent from this part of code, which runs as the appwrite-worker-webhooks container:

CURLOPT_HTTPHEADER,

I think what still missing is the user ID, but I want to add it as the X-Appwrite-Webhook-UserID header

@eldadfux

eldadfux commented Dec 2, 2020

Copy link
Copy Markdown
Member Author

Finished adding all missing tests and added multiple new events!

@eldadfux
eldadfux marked this pull request as ready for review December 3, 2020 12:43
Comment thread app/config/events.php Resolved
Comment thread app/config/events.php Resolved

@christyjacob4 christyjacob4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @eldadfux 👍 🎉

@eldadfux
eldadfux merged commit a3f4cbb into 0.7.x Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Endpoint to get a password reset link or token to be able to implement a custom password reset flow

3 participants