Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login via token #3

Open
byorgey opened this issue Mar 23, 2024 · 2 comments
Open

Login via token #3

byorgey opened this issue Mar 23, 2024 · 2 comments

Comments

@byorgey
Copy link

byorgey commented Mar 23, 2024

Would it be possible to add the ability to login via token rather than via password? I have always logged into Kattis via my Google account, so I do not have a Kattis password as such, but I can get a token via open.kattis.com/download/kattisrc.

I looked into adding this myself and opening a PR, but I am not very familiar with the libraries involved.

@RussellDash332
Copy link
Owner

Hi, sorry for the late reply!

This is a great addition, though I might need to explore a tad on Google's google.auth library for this 😆

@RussellDash332
Copy link
Owner

RussellDash332 commented Oct 11, 2024

Hey, I have browsed on these different login methods as I was making v2.0 and here are my findings. Feel free to correct me if I'm wrong.

  • Github, Google, and LinkedIn logins are best when using OAuth2 methods but they require a client ID and a client secret for the OAuth app you are making. Client IDs are easy to find as you can try to attempt a login and obtain it from the URL generated as you get redirected. The client secret is the reason I didn't move forward with this approach.
  • Token-based logins, as used in kattis-cli, are only used for submitting problems (strictly, I believe). With this, even when you managed to log in successfully, you are denied access to get the homepage's HTML content. In summary, I couldn't perform a GET request had I logged in via a token.

With this being said, I will leave this issue open, in case there is a solution to this. For now, let's stick to the email-based login 🐱, you can always the password string somewhere 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants