1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

SimpleAuth not working properly

Discussion in 'Plugin Help' started by MCMarsBoyee, Jun 24, 2017.

  1. MCMarsBoyee

    MCMarsBoyee Spider Jockey

    Messages:
    30
    GitHub:
    mcmarsboyee
    When I join my server after I installed SimpleAuth, it said the regular message, like "This server requires account registration" and "Please register using: /register <password>". However, after I do the above,(for example, /register 12345passwordexample) the server sends out a message that says "You do not have permission to use the register command!"

    I am not a Pocketmine expert, but I do understand the basics of editing YAML files and editing plugin.yml after it unphar. I am currently using the latest version of Pocketmine 3.0.0ALPHA5 and the latest version of SimpleAuth (v1.8.1)

    I am using PHP version 7.0.3 running Ubuntu 16.0.4 in Linux.
    My build number is 217 and MCPE version is 1.1.0.55, while the protocol version is 113

    I have not changed the code in the SimpleAuth directory or the .phar yet, but the config.yml, antihack.yml and message.yml files are included just in case.

    If you need more information, please contact me and I will be happy to provide you with more information or code from files.

    Thank you!

    Code:
    # AntiHack config for SimpleAuth2
    
    #Enable antihack
    enabled: false
    
    #Enable LOGIN protection ONLY for PurePerms SuperAdmin ranks (and OP if enabled)
    protectsuperadmins: true
    
    #Enable LOGIN protection for OPs
    protectops: true
    
    #Threat Level: 1) Low 2) Medium 3) High
    #How many out of IP, CID and SKIN must be the same to allow unrestricted access
    threat: 2
    
    pinregister: "PLEASE KEEP THIS SECURITY PIN CODE SAFE: "
    pintext: "SCREENSHOT THIS PIN FOR ACCOUNT RECOVERY: "
    pinerror: "PIN ERROR: PLEASE CONTACT STAFF"
    pinchanged: "YOUR SECURITY PIN CODE HAS CHANGED: "
    pinunchanged: "YOUR SECURITY PIN CODE HAS NOT CHANGED: "
    pinreset: "Security data reset for: "
    
    pinhelp1: "You were given your PIN CODE when you registered"
    pinhelp2: "If you have problems please contact staff"
    pinhelp3: "Or ask STAFF to reset your PIN"
    pinhelp4: "For your security, now type <password> <PIN> (with a space)"
    
    hackwarning: "SUSPICIOUS ACTIVITY FOR PLAYER: "
    consolehelp: "Type /login <player> to reset security checks for a player"
    noplayer : "Player Not Found!"
    
    
    Code:
    # Default config for SimpleAuth plugin
    
    #Sets the data provider (yaml, sqlite3, mysql, none).
    #Only use none when there is another plugin that will integrate its dataProvider with SimpleAuth
    #Be aware that data is not automatically moved between data providers.
    dataProvider: yaml
    
    #For MySQL:
    #dataProviderSettings:
    # host: "127.0.0.1"
    # port: 3306
    # user: "user"
    # password: "password"
    # database: "databaseName"
    dataProviderSettings: []
    
    #If enabled, existing logged-in accounts won't be kicked if a new player joins with the same name
    forceSingleSession: true
    
    #Sets the minimum amount of characters to be used when registering a new account
    minPasswordLength: 6
    
    #Will block user after this number of failed attempts. Set to 0 to disable
    blockAfterFail: 6
    
    #If enabled, accounts that are using the same unique id (ip + clientId + name) when logging in again will be automatically authenticated
    authenticateByLastUniqueId: false
    
    #If enabled, will set all the permissions for simleauth.command.register to false
    disableRegister: false
    
    #If enabled, will set all the permissions for simleauth.command.login to false
    disableLogin: false
    
    #Number of seconds to wait for a player to be authenticated. If false, disables the timeout
    #TODO
    authenticateTimeout: 120
    Code:
    # SimpleAuth 1.4.0 language file
    
    join:
     message1: "This server requires account registration."
     message2: "You must authenticate to play."
     register: "Please register using: /register <password>"
     login: "Please log in using: /login <password>"
     popup: "You are not logged in"
    
    register:
     usage: "/register <password>"
     description: "Registers an account"
     permission: "You do not have permission to use the register command!"
     error:
      password: "Your password is too short!"
      registered: "This account is already registered."
      general: "Error during authentication."
    
    login:
     usage: "/login <password>"
     description: "Logs into an account"
     permission: "You do not have permission to use the login command!"
     success: "You have been authenticated."
     error:
      password: "Incorrect password!"
      registered: "This account is not registered."
      block: "Too many tries!"
     
    Last edited: Jun 24, 2017
  2. TheDiamondYT

    TheDiamondYT Zombie

    Messages:
    298
    GitHub:
    TheDiamondYT1
    If you're using a permissions plugin, add the following permissions:

    Code:
    simpleauth.command.register
    simpleauth.command.login
    
     
  3. MCMarsBoyee

    MCMarsBoyee Spider Jockey

    Messages:
    30
    GitHub:
    mcmarsboyee
    So, for example, in PurePerms, add these permissions you listed like so?

    Code:
    ---
    Guest:
      alias: gst
      isDefault: true
      inheritance: []
      permissions:
      - -essentials.kit
      - -essentials.kit.other
      - -pocketmine.command.me
      - pchat.colored.format
      - pchat.colored.nametag
      - pocketmine.command.list
      - pperms.command.ppinfo
      - simpleauth.command.register
      - simpleauth.command.login  worlds: []
    Admin:
      alias: adm
      inheritance:
      - Guest
      permissions:
      - essentials.gamemode
      - pocketmine.broadcast
      - pocketmine.command.gamemode
      - pocketmine.command.give
      - pocketmine.command.kick
      - pocketmine.command.teleport
      - pocketmine.command.time
      worlds: []
    Owner:
      alias: owr
      inheritance:
      - Admin
      permissions:
      - essentials
      - pocketmine.command
      - pperms.command
      worlds: []
    OP:
      alias: op
      inheritance: []
      permissions:
      - '*'
      worlds: []
    ...
    
     
  4. TheDiamondYT

    TheDiamondYT Zombie

    Messages:
    298
    GitHub:
    TheDiamondYT1
    Theoretically, yes. If it doesn't work after that then idk
     
  5. MCMarsBoyee

    MCMarsBoyee Spider Jockey

    Messages:
    30
    GitHub:
    mcmarsboyee
    Thanks for the help! For some reason, I tried the method above before posting this thread but it still didn't work; I think I got the syntax wrong or something. It works now.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.