Commit eff33d81 authored by osuzuki's avatar osuzuki
Browse files

Add missing user data for koa auth

parent eb2932c7
......@@ -53,11 +53,17 @@ export default function createOAuthCallback(config: AuthConfig) {
}
const accessTokenData = await accessTokenResponse.json();
const {access_token: accessToken} = accessTokenData;
const {
access_token: accessToken,
associated_user_scope: associatedUserScope,
associated_user: associatedUser,
} = accessTokenData;
if (ctx.session) {
ctx.session.shop = shop;
ctx.session.accessToken = accessToken;
ctx.session.associatedUserScope = associatedUserScope;
ctx.session.associatedUser = associatedUser;
}
ctx.state.shopify = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment