games647 / FastLogin

Checks if a minecraft player has a valid paid account. If so, they can skip offline authentication automatically. (premium auto login)
https://www.spigotmc.org/resources/fastlogin.14153
MIT License
502 stars 121 forks source link

Cache Mojang requests for offline usage in the case the mojang servers are offline #96

Open popcorn9499 opened 7 years ago

popcorn9499 commented 7 years ago

One feature i think that could be useful on this plugin is the ability to login with a regular minecraft account when mojangs servers are offline and keep your online uuid. you seem to keep the uuids stored i was just thinking that if the ip from the previous login matches and such that they could still login. Maybe you could also make this a config option. Thanks for reading. Otherwise this plugin is amazing keep up the good work.

popcorn9499 commented 7 years ago

https://www.spigotmc.org/resources/alwaysonline.820/ would be an example of what im talking about for reference

Eufranio commented 7 years ago

Auto-in also has this option, Idk If its implemented in FastLogin

popcorn9499 commented 7 years ago

it hasn't been added to fastlogin and auto in is unsupported. it also didn't work at the time i tried with 1.7.10 forge which made me go to fast login. hence y i originally went to fastlogin. The developer nicely went and added support and i thank him a lot for that. but it should be added to fastlogin imo

games647 commented 7 years ago

Aren't the Mojang server a lot more stable nowadays?

null321-jared commented 7 years ago

Kinda. I think they are still using the same service though so it is possible for someone to target.

Instead of caching mojang requests, I think most plugins save the last IP address, and if it matches while the servers are down and the user is logged as premium in the database then it lets them in and forces the correct UUID.

popcorn9499 commented 7 years ago

caching may work but also do the ip for redundancy. Im not sure but thats how id implement it. Because the caching would be in memory and if the server is shut down then you cant login after. thats me tho and id recommend something like that. Thanks for reading.

Eufranio commented 7 years ago

Agree with implementing this. Cache could be saved in the Datastore, like in a new table or so. Logins when Mojang is offline would ask FastLogin for their info and then allowed to join with no issues, and with the correct UUID. The plugins that does it and that I found are one-mode UUIDs only, so I think it's better being implemented on FastLogin's end.

SeruhioX commented 7 years ago

Any news about this? From time to time the mojang session falls and my premium users feel lost as it recognizes them as non-premium

Even when the session is up and running it takes a while to re-recognize them

games647 commented 7 years ago

It should only fail for new players

lukacat10 commented 7 years ago

Maybe #154 that I suggested would work better than Caching the IP? Or maybe combine both to allow premiums whose IP has changed or are at a different location to use my method (which I suggested to be optional).

popcorn9499 commented 7 years ago

I agree that would be nice. I mean it would be nice for the option even if it wasnt used that often. unsure how much extra work that would involve or if the dev would want to.

SeruhioX commented 7 years ago

@games647

Right now, for example, the mojang session is down and premium users can't log in, they receive the message "the session is disabled for maintenance"