app.use(
shopifyAuth({
// if specified, mounts the routes off of the given path
// eg. /shopify/auth, /shopify/auth/callback
// defaults to ''
prefix: '/shopify',
// set access mode, default is 'online'
accessMode: 'offline',
// callback for when auth is completed
afterAuth(ctx) {
const { shop, accessToken } = ctx.state.shopify;
console.log('We did it!', accessToken);
ctx.redirect('/');
},
}),
);
As you can see there are many required properties in AuthConfig which are not shown in the example. Is there some magic that fills these values in? If so, that doesn't seem to align with the typescript compiler as these properties are required.
Leads to errors like:
Argument of type '{ afterAuth(ctx: Context): Promise; }' is not assignable to parameter of type 'OAuthStartOptions'. Type '{ afterAuth(ctx: Context): Promise; }' is missing the following properties from type 'OAuthStartOptions': secret, apiKey
Readme shows:
But actual
ts
interface forshopifyAuth
is:As you can see there are many required properties in
AuthConfig
which are not shown in the example. Is there some magic that fills these values in? If so, that doesn't seem to align with the typescript compiler as these properties are required.Leads to errors like: