Navigation

    CreatiCode Scratch Forum

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

    Does saving private data act as like a "secret" or "environment variable"?

    Help
    question help variables
    2
    2
    198
    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.
    • jeffreyrb03-gmail
      JaecadeJnight Mod Helper last edited by jeffreyrb03-gmail

      14bd6469-55be-4d50-8b37-24d32abb763f-image.png
      Is this basically like a code secret, or better known as an “environment variable”? Like is it secure enough for like storing a password (for anything) or API key/token (for cloud blocks)? Replit has a whole article about secrets, but here is the most important part which just defines them:

      “Secrets are encrypted variables you can store within your project to keep sensitive information safe. With APIs, databases, or other external services, secrets allow you to securely pass authentication credentials without exposing them directly in your code.”

      #LLJW
      <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

      info-creaticode 1 Reply Last reply Reply Quote 0
      • info-creaticode
        CreatiCode @jeffreyrb03-gmail last edited by

        @jeffreyrb03-gmail

        It should not be used to store real secrets like passwords. The reason is that this block runs on the “client” side (the user’s browser), so when the data is sent over the Internet to the webserver, it is exposed in the network package.

        However, for most games/projects you build for learning, it should be good enough.

        The “private” mode is meant to store data specific for one user. Say 100 users are running your shared game. Suppose each of them can specify a secret passcode that can be used to save or load game progress. You can use this block and use the “private” mode, so the data is separated by user ID, and 2 users can’t see each other’s data.

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