Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ilya Vysotski
Koa Shopify Auth
Commits
eff33d81
Commit
eff33d81
authored
Sep 17, 2020
by
osuzuki
Browse files
Add missing user data for koa auth
parent
eb2932c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/auth/create-oauth-callback.ts
View file @
eff33d81
...
...
@@ -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
=
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment