1

Extend /authenticate?password= function (Read 91 times)

    Hey Eric,

     

    I would like to expose the ICS from a training plan as a URL that Google Calendar can sync. This would allow any changes to the training plan to automatically appear in my calendar and thus on my various devices.

     

    I figure the easiest way for this to work might be to extend the existing /authenticate URL that you have working and allow the plans/[planId]/ics URL to accept the ?password=[password] function.

     

    The result would be like this:

    Existing: https://www.runningahead.com/logs/[accountId]/authenticate?password=[password]

    Extend ICS URL with https://www.runningahead.com/logs/[accountId]/plans/[planId]/ics?password=[password]

     

    Or perhaps even make it general, thus any valid site URL accepts ?password=[password] on the end?

     

    What do you think?

     

    Cheers,


    Gareth.

    run-chris-run


      Gareth, are you sure that the URL for a training plan doesn't already work with Google Calendar? I've been doing this in my calendar for a couple of years now without issue (meaning adding it as an external URL, not just downloading and importing). I haven't had to fake any sort of authentication, and my log is private, so I can only assume that it's not protected by authentication.

       

      (Whether or not this is intended is a different question, though it might just be a matter of security through obscurity.)

        Thanks @ctingyu08

         

        It works perfectly once you're smart enough to uncheck "private" on the training plan!!

         

        Gareth.

         

        Eric, feel free to disregard suggestion!

          Gareth, are you sure that the URL for a training plan doesn't already work with Google Calendar? I've been doing this in my calendar for a couple of years now without issue (meaning adding it as an external URL, not just downloading and importing). I haven't had to fake any sort of authentication, and my log is private, so I can only assume that it's not protected by authentication.

           

          (Whether or not this is intended is a different question, though it might just be a matter of security through obscurity.)

           

          Now you got me curious, so I tried "Add by URL" in my Google calendar. The first time, Google said the url is not a valid ICS calendar. Tried it again and Google appeared to put it on my calendars list, but none of the events appear. My training plan is public. Any clues?

          Nothing so needs reforming as other people's habits.
          - Mark Twain

          eric :)


            Thanks @ctingyu08

             

            It works perfectly once you're smart enough to uncheck "private" on the training plan!!

             

            Gareth.

             

            Eric, feel free to disregard suggestion!

             

            Hi Gareth,

            I've been mulling over your request but never responded to you.  Sorry about that.  I don't think this is too hard to add.  It might even simplify the code a bit by removing the special url.  Since you have a workaround, I'll just put it in my queue and work on it when I got a spare hour or so.

             

            eric Smile

               

              Now you got me curious, so I tried "Add by URL" in my Google calendar. The first time, Google said the url is not a valid ICS calendar. Tried it again and Google appeared to put it on my calendars list, but none of the events appear. My training plan is public. Any clues?

               

              Took me a bit, by I got this to work for me too.  The trick was to copy the url targeted by the "Download ICS" button. Right-click on the button and copy that link address to use in your Google calendar.

                Got it to work. Very cool to see my planned workouts on google calendar, esp on my phone.

                  Took me a bit, by I got this to work for me too.  The trick was to copy the url targeted by the "Download ICS" button. Right-click on the button and copy that link address to use in your Google calendar.

                   

                  Ah, very cool; it works!  My training plan is visible on my phone now. Smile

                  Nothing so needs reforming as other people's habits.
                  - Mark Twain

                  run-chris-run


                    Ah yes, forgot about the private flag. Yep, unset the private flag, right-click on the download, copy URL, and done!

                      If using Google Calendar to do this it seems to be very sketchy on when it will 'refresh' the calendar.  Meaning if you change something in your training plan (or any external iCal calendar) it could take from hours to days to finally show up in your sync'd calendar.  Unacceptable and unusable really.  Google probem, though.

                      PRs

                        I'll keep that in mind. I don't really need sync anyway; I expect my training plan to remain static.

                        Nothing so needs reforming as other people's habits.
                        - Mark Twain