-
Notifications
You must be signed in to change notification settings - Fork 140
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
Refactored getCurrentUser.js and setCookie #579
Conversation
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.
Please edit your PR to set the internally stored token in jar
}) | ||
} | ||
try { | ||
const res = await getCurrentUser({ jar: { session: args.cookie } }) |
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.
Could return await getCurrentUser(...);
to remove an unnecessary line and variable.
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.
Or, a better solution would be to match the original behaviour and actually set the session token following validation!
Please test your PRs. Reading your code, if validate is enabled the internally stored cookie will never be updated.
No activity and fixed elsewhere |
Made the export function easier to read