FlexibleLogin [v0.17] for Sponge 7+ - Auth plugin - 2FA

Is it serious?

[09:33:05] [Server thread/ERROR] [flexiblelogin]: Error loading the configuration
ninja.leaping.configurate.objectmapping.ObjectMappingException: Invalid enum constant provided for hashAlgo: Expected a value of enum com.github.games647.flexiblelogin.config.General$HashingAlgorithm, got BCRYPT
        at ninja.leaping.configurate.objectmapping.serialize.TypeSerializers$EnumValueSerializer.deserialize(TypeSerializers.java:132) ~[spongeforge-1.10.2-2477-5.2.0-BETA-2793.jar:1.10.2-2477-5.2.0-BETA-2793]
        at ninja.leaping.configurate.objectmapping.serialize.TypeSerializers$EnumValueSerializer.deserialize(TypeSerializers.java:118) ~[spongeforge-1.10.2-2477-5.2.0-BETA-2793.jar:1.10.2-2477-5.2.0-BETA-2793]
        at ninja.leaping.configurate.objectmapping.ObjectMapper$FieldData.deserializeFrom(ObjectMapper.java:85) ~[spongeforge-1.10.2-2477-5.2.0-BETA-2793.jar:1.10.2-2477-5.2.0-BETA-2793]
        at ninja.leaping.configurate.objectmapping.ObjectMapper$BoundInstance.populate(ObjectMapper.java:148) ~[spongeforge-1.10.2-2477-5.2.0-BETA-2793.jar:1.10.2-2477-5.2.0-BETA-2793]
        at com.github.games647.flexiblelogin.config.Settings.loadMapper(Settings.java:99) [Settings.class:?]
        at com.github.games647.flexiblelogin.config.Settings.load(Settings.java:88) [Settings.class:?]
        at com.github.games647.flexiblelogin.FlexibleLogin.init(FlexibleLogin.java:174) [FlexibleLogin.class:?]
        at com.github.games647.flexiblelogin.FlexibleLogin.onPreInit(FlexibleLogin.java:111) [FlexibleLogin.class:?]
        at org.spongepowered.common.event.listener.GamePreInitializationEventListener_FlexibleLogin_onPreInit12.handle(Unknown Source) [?:?]
        at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95) [RegisteredListener.class:1.10.2-2477-5.2.0-BETA-2793]
        at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:313) [SpongeModEventManager.class:1.10.2-2477-5.2.0-BETA-2793]
        at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:342) [SpongeModEventManager.class:1.10.2-2477-5.2.0-BETA-2793]
        at org.spongepowered.mod.SpongeMod.onStateEvent(SpongeMod.java:234) [SpongeMod.class:1.10.2-2477-5.2.0-BETA-2793]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_161]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_161]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_161]
        at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [minecraft_server.1.10.2.jar:?]
        at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [minecraft_server.1.10.2.jar:?]
        at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [minecraft_server.1.10.2.jar:?]
        at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [minecraft_server.1.10.2.jar:?]
        at com.google.common.eventbus.EventBus.post(EventBus.java:275) [minecraft_server.1.10.2.jar:?]
        at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:243) [LoadController.class:?]
        at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:221) [LoadController.class:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_161]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_161]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_161]
        at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [minecraft_server.1.10.2.jar:?]
        at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [minecraft_server.1.10.2.jar:?]
        at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [minecraft_server.1.10.2.jar:?]
        at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [minecraft_server.1.10.2.jar:?]
        at com.google.common.eventbus.EventBus.post(EventBus.java:275) [minecraft_server.1.10.2.jar:?]
        at net.minecraftforge.fml.common.LoadController.redirect$onPost$zzb000(LoadController.java:561) [LoadController.class:?]
        at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:145) [LoadController.class:?]
        at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:624) [Loader.class:?]
        at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:99) [FMLServerHandler.class:?]
        at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:328) [FMLCommonHandler.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:121) [ld.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:431) [MinecraftServer.class:?]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161]

Yes it cannot parse the config. Please try to write BCrypt like this: “Bcrypt” into the config. I never thought that this would break something.

Yes I have tried editing in the configuration file: Bcrypt to totp and it no longer reports the error.
But I still do not understand what is Bcrypt and totp. And what does that error message mean?

BCrypt is for password register and totp for time based two factor codes using an APP on your phone.

That it doesn’t know what this configuration option mean.

After editing into totp, I can not / login password? What should I do next?

image

For TOTP you have to scan the scan the QR Code with your phone using a 2FA app and then you get the login on your phone. If you want password registration you have to clear the database obviously.

Error for register a player :

22.04 20:33:23 [Server] pool-3-thread-221/ERROR [flexiblelogin]: Error creating hash
22.04 20:33:23 [Server] INFO java.lang.NullPointerException: null
22.04 20:33:23 [Server] INFO at com.github.games647.flexiblelogin.Database.createAccount(Database.java:267) ~[Database.class:?]
22.04 20:33:23 [Server] INFO at com.github.games647.flexiblelogin.tasks.ForceRegTask.run(ForceRegTask.java:61) ~[ForceRegTask.class:?]
22.04 20:33:23 [Server] INFO at org.spongepowered.api.scheduler.Task$Builder.lambda$execute$0(Task.java:139) ~[Task$Builder.class:1.12.2-2611-7.1.0-BETA-2990]
22.04 20:33:23 [Server] INFO at org.spongepowered.common.scheduler.SchedulerBase.lambda$startTask$0(SchedulerBase.java:186) ~[SchedulerBase.class:1.12.2-2611-7.1.0-BETA-2990]
22.04 20:33:23 [Server] INFO at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_131]
22.04 20:33:23 [Server] INFO at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_131]
22.04 20:33:23 [Server] INFO at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
22.04 20:33:23 [Server] INFO at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
22.04 20:33:23 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]

Yes, but only for force registers using the admin commands not if the players register on their own. This was already reported (ref) and will be fixed in the next release:

The auto login d’ont work

In case, you didn’t received the notification.

Any way to hide password when players loged in server on console?

Which server software do you use? The sponge API doesn’t provide such a way.

I’m ussing Forge+Sponge.

Which version and what other plugins do you have installed, because I cannot reproduce it.

Perhaps you have configured logging commands in some plugin (nucleus… )

Is there some way I can disable requiring two passwords when 2FA is disabled? I just want a simple password based authentication mechanism but there doesn’t seem to be any config option for that.

Two passwords are only required for registering. It prevents typos.

Wait, do you mean to just enter the same password twice? The way it’s worded, it sounds like a user needs to create and remember two different passwords, and that doesn’t make any sense.