GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - jonathanhecl/controlrun: Control the access of your apps with Firebase

BranchesTags
Open more actions menu

Latest commit

 

History

22 Commits
22 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
controlrun.go
controlrun.go
 
 
controlrun_test.go
controlrun_test.go
 
 

Repository files navigation

ControlRun

Control the access of your apps with Firebase

Setting Firebase

  1. Create a Firebase Project https://firebase.google.com
  2. Go to Database options and choice to create a "Realtime Database".
  3. Go to rules and paste:
{
 "rules": {
   ".read": false,
   ".write": false,
   "$project": {
   	".read": false,
        "$token": {
           ".read": "data.val() == 1"
     	}
   }
 }
}
  1. Go to Data and import or create an struct like this code:
{
 "appName" : {
  "tokenCode" : 0
 }
}

The tokenCode can be what you want, like the client name.

  1. If you want to activate an tokenCode, only need put 1 in the value.

You can combine it with my other project autosign to create the unique tokenCode and protect you app from crackers.

Start using it

  1. Download and install it:
   $ go get github.com/jonathanhecl/controlrun
  1. Import it in your code:
   import "github.com/jonathanhecl/controlrun"
  1. Setup your Firebase:
   controlrun.Set("[ProjectName]", "[appName]/[tokenCode]")
  1. Control the access:
   err := controlrun.Run()
   if err != nil {
   	panic("Permission denied")
   }

How use hash verification

  1. Run in a local file or an any test:
    hash := controlrun.Set("[ProjectName]", "[appName]/[tokenCode]")
    println(hash)
  1. Copy your hash generated, and use it in the Run() function:
   err := controlrun.Run("da39a3ee5e6b4b0d3255bfef95601890afd80709")
   if err != nil {
   	panic("Permission denied")
   }

Screenshots

Firebase struct

Firebase struct

About

Control the access of your apps with Firebase

Resources

Readme
GPL-3.0 license
Activity

Stars

2 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.