Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Throw specific error for missing cookies on OAuth #131

Merged
merged 1 commit into from
Mar 10, 2021

Conversation

paulomarg
Copy link
Contributor

@paulomarg paulomarg commented Mar 10, 2021

WHY are these changes introduced?

As mentioned on Shopify/koa-shopify-auth#61 (comment), we were throwing the same error (SessionNotFound) if the session itself was missing, or if the cookie the holds its id was missing, which can be confusing when errors happen.

WHAT is this pull request doing?

Throwing a specific CookieNotFound error if we can't load the session id from the cookie to make it easier to surface issues to apps.

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have added a changelog entry, prefixed by the type of change noted above
  • I have added/updated tests for this change
  • I have documented new APIs/updated the documentation for modified APIs (for public APIs)

@paulomarg paulomarg requested a review from a team as a code owner March 10, 2021 15:27
@paulomarg paulomarg force-pushed the throw_specific_cookie_error_on_oauth branch from 08b8fc3 to 3a08fd3 Compare March 10, 2021 15:28
Copy link
Contributor

@thecodepixi thecodepixi left a comment

Choose a reason for hiding this comment

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

Makes sense to me!

@paulomarg paulomarg merged commit 16ae704 into main Mar 10, 2021
@paulomarg paulomarg deleted the throw_specific_cookie_error_on_oauth branch March 10, 2021 17:41
@avocadoslab
Copy link

@paulomarg thanks for this! When should we expect new release tag for @shopify/koa-shopify-auth?

@paulomarg paulomarg temporarily deployed to production March 16, 2021 17:41 Inactive
# 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.

3 participants