-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
[stable12] Improve OAuth #9546
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
[stable12] Improve OAuth #9546
Conversation
|
I have no idea why the test fail it seems unrelated. |
ChristophWurst
left a comment
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.
Looks good, I just found one spot where it could make sense to add some logging 👍
| $appToken->setExpires($this->time->getTime() + 3600); | ||
| $this->tokenProvider->updateToken($appToken); | ||
| } catch (InvalidTokenException $e) { | ||
| //Skip this token |
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.
Didn't see this in the original PR, but wouldn't it make sense to at least have a debug log statement for this in case we have to trace bugs in this code?
|
With this there is an endless login loop on the first authorization of an app. cc @rullzer as discussed |
This for example will allow rotating the apptoken for oauth Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
However due to the nature of what we store in the token (encrypted passwords etc). We can't just delete the tokens because that would make the oauth refresh useless. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
On a refresh token request: * rorate * reset expire Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
884d76f to
3e57666
Compare
Codecov Report
@@ Coverage Diff @@
## stable12 #9546 +/- ##
==============================================
+ Coverage 53.91% 53.96% +0.05%
- Complexity 22786 22815 +29
==============================================
Files 1387 1389 +2
Lines 87302 87437 +135
Branches 1331 1331
==============================================
+ Hits 47066 47185 +119
- Misses 40236 40252 +16
|
MorrisJobke
left a comment
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.
Tested and works now 👍
Backport of: