freeCodeCamp icon indicating copy to clipboard operation
freeCodeCamp copied to clipboard

feat(api,client): Add Webhooks with Optional Token

Open werner33 opened this issue 1 year ago • 10 comments
trafficstars

Checklist:

Closes #52542

This adds the following functionality:

  1. A form on the settings page where a user can add a URL (webhook) and an optional token.

  2. When the token is added and when a challenge is completed, a small object is emitted to the URL provided.

  3. The webhook can be updated or deleted at any time on the settings page.

werner33 avatar Feb 06 '24 01:02 werner33

:eyes: Review this PR in a CodeSee Review Map

View the CodeSee Map of this change

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

ghost avatar Feb 06 '24 01:02 ghost

Hi @werner33 thanks a ton for putting this together, it really helps to see the implementation.

We've started discussing this internally, but it will take us a little time to figure out if this is something we can support. Typically we meet weekly, so, all being well, we should be able to get back to you next week. :crossed_fingers:

ojeytonwilliams avatar Feb 06 '24 16:02 ojeytonwilliams

Thanks so much @ojeytonwilliams. I know more changes or refinements may be needed and I am happy to do them. Please let me know if you would like anything else.

werner33 avatar Feb 06 '24 23:02 werner33

@werner33 We realise this feature has taken longer to get reviewed than desirable. If you do not mind, I can push the changes necessary to resolve my previous review?

ShaunSHamilton avatar Apr 15 '24 06:04 ShaunSHamilton

Please feel free to make any changes. I don’t mind. I made some changes that you might see there. Thanks so much!

On Mon, Apr 15, 2024 at 2:59 AM Shaun Hamilton @.***> wrote:

@werner33 https://github.com/werner33 We realise this feature has taken longer to get reviewed than desirable. If you do not mind, I can push the changes necessary to resolve my previous review?

— Reply to this email directly, view it on GitHub https://github.com/freeCodeCamp/freeCodeCamp/pull/53560#issuecomment-2055710090, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFJB3JXBCQGNQK35WVQPF3Y5N3ELAVCNFSM6AAAAABC3DG5GWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJVG4YTAMBZGA . You are receiving this because you were mentioned.Message ID: @.***>

werner33 avatar Apr 15 '24 12:04 werner33

@werner33 I am making changes to this PR, and should push them up tomorrow.

For the initial launch, we do want to restrict the URLs allowed in the webhooks. Would you mind sharing the URL you are interested in receiving on?

ShaunSHamilton avatar Apr 15 '24 17:04 ShaunSHamilton

Thanks so much for your help with this Shaun.

The URL I will be using is https://codewars-tracker-be.herokuapp.com/ freeCodeCamp

Let me know if you have any questions and if I can help in any way.

On Mon, Apr 15, 2024 at 1:15 PM Shaun Hamilton @.***> wrote:

@werner33 https://github.com/werner33 I am making changes to this PR, and should push them up tomorrow.

For the initial launch, we do want to restrict the URLs allowed in the webhooks. Would you mind sharing the URL you are interested in receiving on?

— Reply to this email directly, view it on GitHub https://github.com/freeCodeCamp/freeCodeCamp/pull/53560#issuecomment-2057428381, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFJB3NLHMWAUZDMDDJNH2DY5QDJVAVCNFSM6AAAAABC3DG5GWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJXGQZDQMZYGE . You are receiving this because you were mentioned.Message ID: @.***>

werner33 avatar Apr 15 '24 17:04 werner33

Hey @werner33 do yo mind replying over on GitHub's UI - it seems the email reply has a bad format. Cheers.

raisedadead avatar Apr 16 '24 04:04 raisedadead

@ShaunSHamilton Thank you so much for the work you are doing here. I really appreciate it.

@raisedadead I saw your message today. I'm sorry I got very sick on the 15th and have only today been back on my computer at all. I think the info is resolved but please do let me know if anything else is needed.

Thank you both very much!

werner33 avatar Apr 19 '24 01:04 werner33

Hey @werner33 - No worries – we work async. I just wish you a speedy recovery. If we have any further questions we will let you know. Cheers.

raisedadead avatar Apr 19 '24 05:04 raisedadead

Hey @werner33

Thanks a lot for your patience with this. We had a long meeting about this feature. We have unfortunately come to the conclusion that it will add significant challenges in moving this over to the new API.

In an ideal world we want to offload sending webhook events to a "micro-service". That's something I think we do not want to build into the current API.

I am happy to meet you to explain this in detail if you are interested in the technicals.

Thanks again, I think we like the idea of webhooks and we will build this in the new API with the GitHub-style experience you and I talked about.

It should be more powerful and secure that way.

Cheers!

raisedadead avatar Apr 23 '24 15:04 raisedadead

@raisedadead Man that is hugely disappointing. I was really hoping to make this a much bigger part of our program.

Thank you for letting me know. Let me know if I can be helpful in the future.

Thank you.

werner33 avatar Apr 23 '24 21:04 werner33