Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Implementation of Oauth of Github, Google and Microsoft #4298
base: master
Are you sure you want to change the base?
Implementation of Oauth of Github, Google and Microsoft #4298
Changes from 19 commits
63d5f9b
3d6ced1
74c1202
3c0b13f
d75edbd
47ba1dd
822c626
251f7dd
1394f28
785a0f0
be35303
370908e
9bc3482
422aacb
feabac5
1967161
0b5f571
2faf4f2
a9713c9
bdbd6b6
1b6c87a
4ab45de
472efad
3c78f2d
3e32aa7
066ef7b
3c83d1e
77f6fc5
d5c9a8c
fc930b3
ff7c83f
8ef45dd
0f02c88
d50718d
2050b3c
cd7d61f
7095028
e72c224
b501310
0066143
99f07b5
2ffe925
1f0692d
85f7d63
95288d3
dd77fbb
e1d47e1
c286c7c
9ba1d12
ec3be0a
993cf33
87731a4
05e58db
40f8a07
71e35c5
09f49c4
a8a1503
0b2d7b3
c8e0c3a
ebd1aa3
9595370
5256b0e
e37683a
4a5c76b
93e0605
afb9323
c99d550
cc9ce96
6a44b25
c96c10d
b71af06
152f0d9
d6561b8
21d3a8a
65adbbd
1617633
3d22dfb
0ac3d52
c396d59
0caea7e
39a3ad4
161106c
3f774da
8cd4793
ad5beec
e3d6d7a
6148c4d
4f083b4
1df88ff
0b9f8f9
15d710f
2aadc99
4393e55
4b6cc2e
e18d6ab
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Official capitalization is OAuth.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, renamed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be reused for the current authentication method? Currently a new session is made for every login attempt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made it so every new login attempts, deletes all sessions with that username, is that a fine solution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not really what I meant here - what I meant was reusing this
OAuth2Session
object, as it keeps the internal state which helps verify the authenticity of the login attempts. If this is not feasible, consider settingsession.state
and other variables manually into the newly created object here. I don't think there's a need to invalidate other logins every time there is one - this is not the case for other login methods either.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exceptions from fetch_token and other OAuth methods should be caught and rethrown.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are providers case-sensitive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, now whatever the performLogin() gets as provider is being transformed into lowercase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when an OAuth user changes their password on the OAuth service? Or their account gets flagged for fraud or similar? According to the OAuth service their account will be disabled and the
access_token
revoked, but on the CodeChecker service they will stay logged in.The session manager must store the
access_token
associated with the session, and periodically check the validity of the storedaccess_token
on user interaction. It must also handle refreshing it using therefresh_token
, if theaccess_token
expired. (These could both be handled by authlib.)