No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Securing google map API, in cordova and web

    Help
    3
    11
    376
    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.
    • T
      technowebs last edited by

      Hi all,

      I am using quasar-google-maps for my project(Web, Android, iOS), which is working fine without API restrictions.

      It’s working in the web with HTTP Referrer restriction. But, in mobile device it’s showing error, I tried SHA1 restrictions for android. I am not sure if there anything needed to add in config.xml or not?

      If anyone has secured api keys in android, please share some thought on this.

      Thanks

      dobbel 1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel @technowebs last edited by dobbel

        @technowebs

        You’re using Cordova or Capacitor for Android and Ios?

        What is the error?

        T 1 Reply Last reply Reply Quote 0
        • T
          technowebs @dobbel last edited by

          @dobbel I am using cordova, and getting RefererNotAllowedMapError

          dobbel 1 Reply Last reply Reply Quote 0
          • S
            suleiman_as last edited by suleiman_as

            in web you can always restrict the API usage to the domain from the google console, but with cordova you can’t do that. how about loading the map from your backend

            T 1 Reply Last reply Reply Quote 0
            • dobbel
              dobbel @technowebs last edited by

              @technowebs

              how about loading the map from your backend

              Or you could try this:
              https://github.com/mapsplugin/cordova-plugin-googlemaps

              T 2 Replies Last reply Reply Quote 1
              • T
                technowebs @dobbel last edited by

                @dobbel Thanks I will try it, and check if it solves the security issue.

                My current plugin working fine in Android too when I remove the restriction (SHA1) from the API console. May be Cordova specific plugin solve the issue. I will test and update

                Thanks

                1 Reply Last reply Reply Quote 0
                • T
                  technowebs @suleiman_as last edited by

                  @suleiman_as got it, but I am not understanding how to implement interactive google map from backend 😞

                  S 1 Reply Last reply Reply Quote 0
                  • T
                    technowebs @dobbel last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • S
                      suleiman_as @technowebs last edited by

                      This post is deleted!
                      T 1 Reply Last reply Reply Quote 0
                      • T
                        technowebs @suleiman_as last edited by

                        @suleiman_as I am facing problem with android apps, PWA is not a solution for me 😞

                        In browsers it’s working perfectly. I also tried cordova-plugin-googlemaps, unfortunately that’s also not working in my project. Only a empty map area is rendering, nothing is appearing, no console errors.

                        dobbel 1 Reply Last reply Reply Quote 0
                        • dobbel
                          dobbel @technowebs last edited by dobbel

                          @technowebs

                          You could always try some other map library, these WILL work everywhere.

                          https://github.com/vue-leaflet/Vue2Leaflet
                          https://github.com/ghettovoice/vuelayers/

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post