fitness tracking
trying to integrate with https://www.polar.com/accesslink-api/?srsltid=AfmBOooE910RcxJdKHXs5u7sWjpegMxc8yZJQd_HckBMyFSvVUVLhxzP#polar-accesslink-api
and eventually with Garmin as well
wondering if this should integrate with Convex Auth
7 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
What are you looking for in an integration?
or what does integrate mean?
Do you want to use Garmin or Polar as an auth provider?
Possibly, I hadn't thought of it like that but that is basically how teh integration works. The user logs into polar using oauth 2 and it redirects back with a token to be used to retrieve fitness data that comes from their watch
I'm unclear how to handle the redirect. I can set the redirect to the call convex can convex than redirect back to local host?
Got it, sounds like this has to do with using a token for more than just identity, so you need to keep that original token.
Yes, this is how Convex Auth works
whats the command to do that
do I need to create a HTTP action
Could we back up, what are you trying to do?
It sounds like you want to get a JWT from Polar, and then use that JWT to get data from Polar?
Separately, there's a notion of auth in convex. If that JWT from Polar is an OAuth OpenID Connect ID token, that you can use that token for authenticating with Convex as well.
The way Convex Auth works is that it mints a new JWT for identity.
I'm not sure what your goal is here, if you're indeed trying to use the Polar JWT for both, then see https://github.com/get-convex/convex-auth/issues/135 for how another use handled something similar
But I'm not sure if that's actually what you're tryhing to do
Thank you, I am still trying to finish implement the full thing
But I managed to have the front end call for auth and than it forwards to the convex backend and than convex calls and gets a token and redirects back to localhost
which was the part I was confused about
Thank you