Skip to content
This repository was archived by the owner on Mar 22, 2022. It is now read-only.

Allow the cookie to be set if action is not remove #474

Merged
merged 1 commit into from
Apr 7, 2017

Conversation

marshallswain
Copy link
Member

@marshallswain marshallswain commented Apr 6, 2017

This removes the service requirement for setting the cookie. If it did run after remove it won’t set the cookie, though.

Closes feathersjs-ecosystem/authentication-oauth2#12

This removes the service requirement for setting the cookie.  If it did run after `remove` it won’t set the cookie, though.
@marshallswain marshallswain requested a review from ekryski April 6, 2017 16:14
// we weren't removing the token and we have a JWT access token.
if (res.hook && res.hook.method !== 'remove' && res.data && res.data.accessToken) {
// Don't set the cookie if this was called after removing the token.
if (res.hook && res.hook.method === 'remove') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup I think this should be fine. Good catch on that issue. Funny how simple logic can have such implications.

@ekryski
Copy link
Member

ekryski commented Apr 7, 2017

:shipit:

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants