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

Timeout crash again #31

Open
steverc opened this issue Sep 29, 2015 · 2 comments
Open

Timeout crash again #31

steverc opened this issue Sep 29, 2015 · 2 comments

Comments

@steverc
Copy link

steverc commented Sep 29, 2015

(Cannot reopen my previous issue #28 so I opened a new one)
It looks like the fix added in c0965da is not working, I had the crash again: auth object exists, but auth.access is undefined, so access to auth.access.length crashes the server.
My use case is the following: start server, open browser and authenticate, close browser, keep the server running. When timeout expires I have the crash...

@steverc
Copy link
Author

steverc commented Oct 12, 2015

Hi again, an hint on this issue: is it simply a syntax error? The auth model is defined with attributes "accessTokens" and refreshTokens (see https://github.com/agmoyano/OpenIDConnect/blob/master/index.js#L157), while you check auth.access and auth.refresh (https://github.com/agmoyano/OpenIDConnect/blob/master/index.js#L955 and https://github.com/agmoyano/OpenIDConnect/blob/master/index.js#L916)...

@dash-
Copy link

dash- commented Oct 19, 2015

Experiencing same issue. auth.access is invalid after timeout.

Error is:

/oidcServer/node_modules/openid-connect/index.js:954
if(auth && !auth.access.length && !auth.refresh.length) {
^

TypeError: Cannot read property 'length' of undefined
at /oidcServer/node_modules/openid-connect/index.js:954:72
at wrapper (/oidcServer/node_modules/openid-connect/node_modules/modelling/node_modules/waterline/node_modules/lodash/index.js:3602:19)
at applyInOriginalCtx (/oidcServer/node_modules/openid-connect/node_modules/modelling/node_modules/waterline/lib/waterline/utils/normalize.js:421:80)
...

dash- pushed a commit to dash-/OpenIDConnect that referenced this issue Oct 20, 2015
…rrences of auth.refresh to auth.refreshTokens; as originally recommended by steverc in issue agmoyano#31 (related also to agmoyano#28 and agmoyano#33)
agmoyano added a commit that referenced this issue Oct 21, 2015
Bug fix: auth.access and auth.refresh (issue #31)
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

No branches or pull requests

2 participants