Search Unity

Question Use long time token for Remote Config instead password or alternatives...

Discussion in 'Unity Remote Config' started by kl3in3rhack3r, Mar 9, 2021.

Thread Status:
Not open for further replies.
  1. kl3in3rhack3r

    kl3in3rhack3r

    Joined:
    Nov 22, 2018
    Posts:
    15
    Hello,

    I want to write an Android background service to check for news stored in Remote Config. In the description of the Remote Config API I find I must call login to get an access token first. Now I can get the configuration with it. But I want not store my password in a java file I deploy on X devices. At the end the code can always decompile and so anybody can get my password.
    My knowledge for this problem is that I can generate an long time access token with the one and only role of reading configurations (so it runs on e. g. OpenShift Plattform or GitLab). But I do not find this functionality.

    What is the best practice to use Remote Config API without using my password in code?

    THX! :)
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You would not want to use the API in your application provided to users, it's for admin use (you the developer). Why do you need the API for your needs? Can you not just call FetchConfigs in your code? If it's just for you, then you don't need to worry about security.
     
  3. kl3in3rhack3r

    kl3in3rhack3r

    Joined:
    Nov 22, 2018
    Posts:
    15
    I wan to do this:
    I need an Android background service to check for news stored in remote configuration (like events, e. g. easter event). The notification is shown if the game is not running and I trigger the user to play my game again (it works like Mario Kart (Nintendo) for Android, the events are shown via notifications, too). But with unity tools I do not find any way to do this.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    My suggestion would be the recommended approach.
     
  5. kl3in3rhack3r

    kl3in3rhack3r

    Joined:
    Nov 22, 2018
    Posts:
    15
    But how? What is the way in Unity to fetch the configuration regularly (if app is in background, too)? I do not find any solution for this.
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Use a timer. We don't offer a "changed/updated" callback. Do you have a working background app already, developed using Unity? We would not have specific recommendations with regard to your original password question.
     
  7. kl3in3rhack3r

    kl3in3rhack3r

    Joined:
    Nov 22, 2018
    Posts:
    15
    No, if I google for this I does not find any solution for this... Can you show me a tutorial or example for this? Is the timer is running in background, too?
     
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Sorry, I cannot make recommendation on how to create such a background app, I assumed you already had this part. Apologies on the confusion. You might want to ask in the Scripting forum. Typically such background apps are frowned upon unless you make it very clear to the user what the app is doing, and make it clear when you submit the app to the App Store and/or Google Play. https://forum.unity.com/forums/scripting.12/ . Locking this thread at this time.
     
Thread Status:
Not open for further replies.