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

Add oauth login functionality #211

Merged
merged 4 commits into from
Sep 30, 2020
Merged

Conversation

melvyn2
Copy link
Contributor

@melvyn2 melvyn2 commented Aug 3, 2019

Because we have access to creating OAuth tokens, I thought it might be useful to use them to log in more easily. If any code style changes/refactoring needs to be done, I'd be happy to do it.

steam/webauth.py Outdated Show resolved Hide resolved
steam/webauth.py Outdated Show resolved Hide resolved
@rossengeorgiev
Copy link
Contributor

If I understand this correctly, once I login with mobileauth (user+pass etc) I get oauth_token that I can use with the API to re-authenticate at a future time? And I need to know the correct steam_id? (its not provided by GetGWToken?)

@melvyn2
Copy link
Contributor Author

melvyn2 commented Sep 22, 2019

Yes; once you have a token, you can use it until it gets revoked (which seems to be random). Then, you must get a new one, which does require the username and password. The steam_id is also required. I believe I have also fixed all the notes above.

@rossengeorgiev
Copy link
Contributor

Thanks. I will need to try this out and figure out how this would fit in the class. Wondering whether it might better to implement it as a "remember password" feature.

@rossengeorgiev
Copy link
Contributor

Sorry, this PR has been sitting for a while. Happy to merge

@melvyn2
Copy link
Contributor Author

melvyn2 commented Jul 15, 2020

Ah, sorry for the delay: I've rebased the branch onto master. Does anything else need to be done before merging?

steam/webauth.py Outdated Show resolved Hide resolved
steam/webauth.py Show resolved Hide resolved
@melvyn2
Copy link
Contributor Author

melvyn2 commented Jul 17, 2020

Alright, I've managed to fetch and confirm mobile confirmations w/o the steamid cookie, and verified that the cookie is not present on the desktop site (mobile may still have it, but I don't see why it would). Should the commits be squashed, or left as-is?

@sonarcloud
Copy link

sonarcloud bot commented Jul 17, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@rossengeorgiev rossengeorgiev merged commit 6f955c4 into ValvePython:master Sep 30, 2020
tomprince pushed a commit to tomprince/steam that referenced this pull request Feb 11, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants