theusaf / KahootPY

Python API for Kahoot. Based off of kahoot.js-updated
MIT License
10 stars 6 forks source link

2FA Example #6

Open bwees opened 3 years ago

bwees commented 3 years ago

I see that you implemented a 2FA method but, how should this be implemented?

This is what I have based on the kahoot js docs but It does not seem to work.:



code = [0, 1, 2, 3] # This is changed to the correct code before run

bot.join(959375,"KahootPY")

print("made")

def stepVer():
    bot.answer2Step(code)

bot.on("Joined",joinHandle)
bot.on("questionStart",answer)
bot.on("2Step",stepVer)
theusaf commented 3 years ago

If you have a user using it to interact with Kahoot, you might want to instead wait for the user to tell you what code to put. Otherwise, send a shuffled list [0,1,2,4]

Sent over the interblag from a GUI. https://github.com/theusaf https://shortr.github.io/?llorkcir

On Nov 16, 2020, at 10:11 AM, bwees notifications@github.com wrote:

 I see that you implemented a 2FA method but, how should this be implemented?

This is what I have base on the kahoot js docs:

bot.join(959375,"KahootPY")

print("made")

def stepVer(): bot.answer2Step(code)

bot.on("Joined",joinHandle) bot.on("questionStart",answer) bot.on('2Step', stepVer) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

bwees commented 3 years ago

I know what the code will be, I am asking how should the function be called? What hook do I need to connect to? I have tried pulling the latest version from GitHub instead of pip but I get async errors on join. Do you have an example that shows how to use 2FA? I understand how the list should work but the code that I have written does not seem to work. I connected to the TwoFactorFail (or whatever it is) and that is not called to indicate that it failed. Kahoot! does not show a player joining.

Brandon Wees On Nov 16, 2020, 8:34 PM -0500, theusaf notifications@github.com, wrote:

If you have a user using it to interact with Kahoot, you might want to instead wait for the user to tell you what code to put. Otherwise, send a shuffled list [0,1,2,4]

Sent over the interblag from a GUI. https://github.com/theusaf https://shortr.github.io/?llorkcir

On Nov 16, 2020, at 10:11 AM, bwees notifications@github.com wrote:

I see that you implemented a 2FA method but, how should this be implemented?

This is what I have base on the kahoot js docs:

bot.join(959375,"KahootPY")

print("made")

def stepVer(): bot.answer2Step(code)

bot.on("Joined",joinHandle) bot.on("questionStart",answer) bot.on('2Step', stepVer) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.