-
Notifications
You must be signed in to change notification settings - Fork 221
[koa-shopify-auth] [WIP] ITP 2.1 #416
Conversation
@@ -0,0 +1,45 @@ | |||
(function() { | |||
function setCookieAndRedirect() { | |||
document.cookie = 'shopify.granted_storage_access=true'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just thought of this question now, but should have thought of this earlier: Should the cookies we're setting for both the ITP 2.0 and ITP 2.1 workflows be unique to the app being authenticated (e.g., by adding the app ID to the cookie name)? This question also applies to the shopify_app
gem
cc @ragalie
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, I was having a brain fart moment. Talked it through with Mike and this shouldn't be an issue. Sorry!
dc0a1c8
to
2fc7e31
Compare
Hey @tylerball! Does this PR only implement the solution for ITP 2.0? I'm only seeing the |
0e656be
to
d18056c
Compare
090c9bf
to
e08513a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this ready to be reviewed? Left a couple comments but wasn't sure.
@@ -0,0 +1,45 @@ | |||
(function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why we can't write this in typescript. If you stick another tsconfig.json
in the client
directory you should be able to get it to compile in place and won't have to change your script tags.
await enableCookiesRedirect(ctx); | ||
return; | ||
} | ||
|
||
if (ctx.path === oAuthStartPath && shouldRequestStorage(ctx)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at this point we have a lot of routes in here, we might start to get value from using koa-router
and just exporting the router.routes()
middleware.
@TheMallen not entirely, I'm still working on tests but thanks for the feedback. I'm trying to cover as much as I can in |
We're looking to send out some partner comms warning them of the upcoming changes for Safari 12.1+ users with ITP 2.1 Was wondering if we have a timeline on this PR so we can include it in the comms as well |
@tylerball can this either be updated or closed? |
Closing this in favour of #1413 |
🎩 instructions
yarn link
yarn link @shopify/koa-shopify-auth
TODO