-
Notifications
You must be signed in to change notification settings - Fork 27
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
afterRefreshCheck infinitely called #265
Comments
I might have found the culprit, but I lack enought comprehension of the whole JSDO to say if it's ok. I'd still like to know what do you guys think! I'm not enterely sure of what I'm doing! When the AuthenticationProviderSSO is created, there's this piece of code about credentials that is seemingly rewriting a callback, thus creating the infinite loop. If I rename that var, it all seems to work. It refreshes as expected, or at least it seems so. This is the piece of code:
I hope someone could help me. |
Hey, @W1nstar, the JSDO unfortunately does not officially support SSO.... though if we have enough interest, i can definitely bring this up as something we can officially support. I think that we might've accidentally brought us into callback hell where the name You might just write I'll try to take a look tomorrow |
Thanks a lot for the response. You really made my day! I look forward your help. The callback hell might be real. With the change I did works, but sometimes errors somewhere else, so I guess I'm not on the right track there. I tried to personally look into this, and my goal was to make you guys a PR, but as I said I lack knowledge on most themes going on here to help you. I'll need a few days to be able to look at it, but I will try. We're trying to avoid a manual refresh. We were under the impression it was supported since it seemed to have everything needed inside, plus we saw advertising on progress's learning courses about pasoe, jsdo and SSO. It's a bummer it's not supported officially. Is there any way we can express our interest more officially? Thank you again for your feedback, @joshualan . |
Any news on this issue, @joshualan ? I was able to stop the infinite loop, but now we have found there's an unhandled exception ( Line 10207 in e446162
Edit: forgot to say, the unhandled exception is not a part of sso, it's on the general _openRequest. |
@W1nstar we're throwing something in the backlog for this so we might have time to look into this in the next few months but we judge the amount of interest in the project via pull requests. Sorry for the late reply, was on vacation for a while. Is the same original code causing this issue? |
@joshualan yeah, on the original code there's still the infinite loop plus the _openRequest throw arg. |
This fix was the same as mine as well. The deceleration of "callback" inside _openRequestAndAuthorize function caused a loop from afterRefreshCheck at line 291. Updating line 308 and 314 corrects this issue and successfully refreshes the token and continues the original request in our project. @edselg Do you think we can get the pull request #276 pushed into the live branch for others to be able to use it (including our other projects)? |
We've been trying to set up a SSO driven JSDO project, but we can't past the fact it hangs on the afterRefreshCheck.
It can login no problem, any CRUD operation is working as expected, but after the token is expired out, the JSDO class tries to refresh it and enters an infinite loop.
We've tried to set this up by ourselves using the scarce documentation we could find on PASOE related SSO. We couldn't find any documentation at all on JSDO with SSO.
Any help would be welcome.
This is how we login on the system:
After the token has expired, this is the callstack we're facing:
the callstack
this is how it starts
Like I said, we're doing this by ourselves so any help would be appreciated.
Thanks in advance, and apologies if this is common knowledge but we're just beign dumb.
The text was updated successfully, but these errors were encountered: