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

Authentication Pop-up appears because /notifications/sse request uses expired bearer token #9635

Closed
ScharfViktor opened this issue Aug 31, 2023 · 9 comments · Fixed by #9654
Assignees

Comments

@ScharfViktor
Copy link
Contributor

ScharfViktor commented Aug 31, 2023

ocis 4.0.0
web 7.1.0-rc.5

Steps:

  • user logs in and stay on system more that 5 min

Expected result: no authentication Pop-up

Actual result: after token refreshing appears the authentication Pop-up

image

because request https://host.docker.internal:9200/ocs/v2.php/apps/notifications/api/v1/notifications/sse uses expired bearer token

image

@ScharfViktor ScharfViktor changed the title Authentication Pop-up appears because /notifications/sse uses expired bearer token Authentication Pop-up appears because /notifications/sse request uses expired bearer token Aug 31, 2023
@AlexAndBear
Copy link
Contributor

@lookacat could you take over ?

@dschmidt
Copy link
Member

dschmidt commented Sep 2, 2023

But isn't this also an oCIS bug? Even if the token is expired, I wouldnt expect the header to require a password to be sent
Imho it should only be sent when the Authorization header is absent

@JammingBen
Copy link
Collaborator

Turns out web was missing the proper X-Requested-With: XMLHttpRequest header in the SSE request.

@dschmidt
Copy link
Member

dschmidt commented Sep 6, 2023

Turns out web was missing the proper X-Requested-With: XMLHttpRequest header in the SSE request.

Ah, yes, that's probably what I was thinking of, not the Authorization header

@ScharfViktor
Copy link
Contributor Author

looks like that #9654 did not solve the pop-up problem

Screenshot 2023-09-15 at 15 45 50

@ScharfViktor ScharfViktor reopened this Sep 15, 2023
@JammingBen
Copy link
Collaborator

@ScharfViktor It looks like the X-Requested-With: XMLHttpRequest header is not present, or is it cut off down below? Are you sure you're running current master?

@ScharfViktor
Copy link
Contributor Author

Yes, X-Requested-With: XMLHttpRequest header is present. I use current master

image

@JammingBen
Copy link
Collaborator

Hmm I'm not able to reproduce it on my system. Can you send me your ocis config flags? Also, are you running ocis locally or via our Docker dev setup?

@ScharfViktor
Copy link
Contributor Author

re-tested on 8.0.0-beta.2
works fine

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

Successfully merging a pull request may close this issue.

4 participants