koa-shopify-auth icon indicating copy to clipboard operation
koa-shopify-auth copied to clipboard

Create utility function to tell whether an AccessMode is online / offline

Open paulomarg opened this issue 4 years ago • 4 comments

Overview

We currently check if AccessMode === 'online' in several places in the code. We could extract those checks into a shared method, in possibly a new utilities project folder, where we can gather values that are common to both shopifyAuth and verifyRequest.

We should also consider changing the AccessMode type into an enum so we don't have to rely on the actual string values in the code.

Type

  • [ ] New feature
  • [X] Changes to existing features

Motivation

This is mostly to make maintenance easier, and to ensure that we have consistent code style / behaviour around AccessMode values.

Checklist

  • [X] Please delete the labels section before submitting your issue
  • [X] I have described this feature request in a way that is actionable (if possible)

paulomarg avatar Mar 02 '21 19:03 paulomarg

@paulomarg Is this issue still open. I would like to do this issue, if its still open.

akhilmhdh avatar Apr 11 '21 06:04 akhilmhdh

Hey @akhilmhdh, we haven't gotten around to this one yet, so it's up for grabs. If you're able to do this, we'd appreciate your contribution!

paulomarg avatar Apr 12 '21 12:04 paulomarg

@paulomarg ohh great. Would love to. Then ill work on it. Please assign it to me.

akhilmhdh avatar Apr 12 '21 13:04 akhilmhdh

@paulomarg While i was setting up the project. I just noticed something. The eslint seems to be not linting. The project also has a gh action on commit to lint.

But the linting is just running eslint without checking any file. When i add yarn lint . it ask for eslint config file which is also missing. On yarn lint its says done but its not doing anything.

Is this expected or am i missing something on linting here.

akhilmhdh avatar Apr 12 '21 15:04 akhilmhdh

Note that this repo is no longer maintained and this issue will not be reviewed. Prefer the official JavaScript API library. If you still want to use Koa, see simple-koa-shopify-auth for a potential community solution.

github-actions[bot] avatar Jan 30 '23 20:01 github-actions[bot]