• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-Strava Auth Fail

Scheduled Pinned Locked Moved Troubleshooting
10 Posts 6 Posters 1.3k Views 6 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    huso15
    last edited by May 12, 2020, 3:58 AM

    I followed all the steps, but I fail to authorize the app.

    Every time I go to http://localhost:8080/MMM-Strava/auth/ or http://192.168.1.23:8080/MMM-Strava/auth I get “Safari failed to open page”. Any idea on what I"m doing wrong? I’d love to get this module to work on my mirror.

    alt text

    Thank you in advance for all your help.

    L 1 Reply Last reply May 12, 2020, 8:27 AM Reply Quote 0
    • L Offline
      lavolp3 Module Developer @huso15
      last edited by May 12, 2020, 8:27 AM

      @huso15 Where do you have the mirror running? On the mac or on a pi?

      How to troubleshoot modules
      MMM-soccer v2, MMM-AVStock

      L 1 Reply Last reply May 12, 2020, 8:32 AM Reply Quote 0
      • L Offline
        lavolp3 Module Developer @lavolp3
        last edited by lavolp3 May 12, 2020, 8:32 AM May 12, 2020, 8:32 AM

        @lavolp3 If I remember correctly:
        If you’re trying to auth from your mac’s browser using the pi as the mirror you should use the Pi’s IP address as callback URL. NOT “localhost”.
        You need to use a valid address you can enter from your mac or laptop.

        http://192.168.1.23:8080/MMM-Strava/auth

        This one works if you also use http://192.168.1.23:8080 as callback URL for the authentication.

        How to troubleshoot modules
        MMM-soccer v2, MMM-AVStock

        H 1 Reply Last reply May 13, 2020, 4:29 AM Reply Quote 0
        • H Offline
          huso15 @lavolp3
          last edited by May 13, 2020, 4:29 AM

          @lavolp3 Thank you for the reply.

          I’m running MagicMirror on PI. I’m using SSH on Mac’s terminal to access PI. The Strava Auth I’m trying to run through Safari on my Mac by using PI’s IP: 192.168.1.23 - but, it doesn’t work. I’m still getting Failed to Open Page.

          I’ve tried 192.168.1.23, localhost, and even 192.168.1.23:8080 as Authorization Local Callback Domain, but still nothing.

          No idea how to proceed or what I’m doing wrong here.

          1 Reply Last reply Reply Quote 0
          • H Offline
            huso15
            last edited by May 15, 2020, 2:34 AM

            Anyone that can help with this issue?

            M 1 Reply Last reply Jan 6, 2021, 6:17 PM Reply Quote 0
            • M Offline
              mumblebaj Module Developer @huso15
              last edited by Jan 6, 2021, 6:17 PM

              @huso15 Hi. You need to add the config to the config.js and start MM. Then run http://192.168.1.23:8080/MMM-Strava/auth in a browser. This should then open the auth page to Strava. Hope this helps.

              Check out my modules at: https://github.com/mumblebaj?tab=repositories

              1 Reply Last reply Reply Quote 0
              • M Offline
                MaXi-XCeL Project Sponsor
                last edited by MaXi-XCeL Jan 7, 2021, 11:15 PM Jan 7, 2021, 11:12 PM

                Your config.js should also allow listen on for 192.168.1.23. By default it is set to “localhost” only.

                There is also a “ipWhitelist” which should reflect the ip address of your Mac and your PI.

                Here’s my config.js relevant to listen on and ipWhitelist

                var config = {
                	address: "0.0.0.0", 	// Address to listen on, can be:
                							// - "localhost", "127.0.0.1", "::1" to listen on loopback interface
                							// - another specific IPv4/6 to listen on a specific interface
                							// - "0.0.0.0", "::" to listen on any interface
                							// Default, when address config is left out or empty, is "localhost"
                	port: 8080,
                	basePath: "/", 	// The URL path where MagicMirror is hosted. If you are using a Reverse proxy
                					// you must set the sub path here. basePath must end with a /
                	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "192.168.178.73", "192.168.178.76"], 	// Set [] to allow all IP addresses
                					// or add a specific IPv4 of 192.168.1.5 :
                					// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
                					// or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
                

                And here’s my Strava module in “config.js”

                	    {
                				module: "MMM-Strava",
                				position: "bottom_right",
                				header: "Strava",
                				config: {
                					client_id: "12345",
                					client_secret: "123456789012345678901234567890",
                					mode: "chart",
                					chartType: "bar",
                					activities: ["run"],
                					stats: ["count", "distance", "elapsed_time", "achievements"],
                					period: "recent",
                					units: "metric",
                				}
                		},
                

                If you’ve downloaded the Strava module and add it to your config together with the listen on and ipWhitelist you should be able to successfully register and use the module.

                Good luck!
                David

                A B 2 Replies Last reply Feb 14, 2021, 10:14 AM Reply Quote 0
                • A Offline
                  acdacd2 @MaXi-XCeL
                  last edited by Feb 14, 2021, 10:14 AM

                  @maxi-xcel hello,

                  I get this message “Cannot GET /MMM-Strava/auth” whith the page request.

                  Any idea ?

                  Thanks,

                  marc,

                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    acdacd2
                    last edited by Feb 14, 2021, 8:19 PM

                    @acdacd2 solved

                    1 Reply Last reply Reply Quote 0
                    • B Offline
                      BerkSmash1984 @MaXi-XCeL
                      last edited by Apr 30, 2022, 2:36 PM

                      @MaXi-XCeL Hello, I am getting client id not authorized, despite having my client ID and client secret correct (from Strava API page). I also have the whitelist setup correctly and can access my MM from my local browser (the MM itself is on a RPI4). I receive the link within the magic mirror and am redirected to the authorization page on Strava, but after clicking authorize and restarting MM, I am still getting the same client ID not authorized. Any help would be greatly appreciated. Thanks!

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy