Can You Use WebHooks in an Angular App?

4,471 views
Skip to first unread message

bob r

unread,
Mar 22, 2021, 12:30:40 AM3/22/21
to Strava API
My Angular application is working great, talking to the Strava API now, but everything runs in the users browser with NO server side logic. I want my users to see real time updates without having to refresh.
Mostly, I want the Angular Code running in the users browser to know right away if the application has been de-authorized.

From within the running code, I know how to send the initial request to Strava Web Hooks, but when it subsequently sends  the hub challenge, how do i listen for it, let alone send a 200 OK HTTP Response?

Has anyone tried to get their Angular app to talk to Strava WebHooks using the RxJS web sockets API, or with anything else, successfully?

Bryant Likes

unread,
Mar 22, 2021, 10:00:58 AM3/22/21
to bob r, Strava API
You'll need a server to be able to use webhooks. 

Not sure how you can build a client only app that integrates with Strava without exposing your client id and secret. 

--
You received this message because you are subscribed to the Google Groups "Strava API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to strava-api+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/strava-api/071017d5-93f9-471b-afee-c1a945ac139en%40googlegroups.com.

Bob Rowden

unread,
Mar 22, 2021, 6:30:01 PM3/22/21
to Bryant Likes, Strava API
Thanks, Bryant! Good catch. While Angular's build process does make it difficult to determine the values from the deployed artifacts, I now see this will have to be mitigated with some server-side logic in order to be FULLY secure. 

Reply all
Reply to author
Forward
0 new messages