-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shopify-app-remix doesn't handle authentication in custom callback (redirect-uri) #1554
Comments
Currently, my working around to make this work in remix is to instantiate another shopify-api client and use the methods. |
Hi @gabriel-rye, thank you for opening this issue, we'll take a look. |
@matteodepalo, thanks! In general, we're looking for a way to get data when our users follow the installation link during the installation process. We currently use the installation link's state param and custom callback. But if somehow remix-shopify-app provides this param in the |
I'm having the exact same requirement / issue as @gabriel-rye . Any updates on this? having access to the param on |
OK - my approach was to save the custom parameter on a Prisma model and access it on |
Hey folks! Yeah my approach was to save the state param since the normal
flow would be to exist the iframe and get back with cookie set making the
auth flow complete. In the afterAuth you check if there is a state attached
in db to the shop if so, do the custom setup logic.
…On Mon, 14 Oct 2024 at 10:12 Tiago Reis ***@***.***> wrote:
OK - my approach was to save the custom parameter on a Prisma model and
access it on afterAuth.
—
Reply to this email directly, view it on GitHub
<#1554 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BJ5W4NTWYBYMBAFWZRDJIPDZ3O7NHAVCNFSM6AAAAABOXDOMV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJRGIZTEMRRHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Issue summary
Before opening this issue, I have:
@shopify/*
package and version:{ logger: { level: LogSeverity.Debug } }
in my configuration, when applicableExpected behavior
Im trying to complete the callback process on a custom auth callback. Using a custom installation link like
https://rye-gabriel-test.myshopify.com/admin/oauth/authorize?client_id=X&scope=unauthenticated_read_product_listings&redirect_uri=https://princeton-engineers-scenic-arrow.trycloudflare.com/api/auth/callback&state=123
Shopify will call
/api/auth/callback
but when callingconst { session, admin, redirect } = await authenticate.admin(request);
in this route breaks the auth process.It looks like the auth process can't handle custom callback uri since it always
/auth/callback
, causing it to fail sincein
respondToOAuthRequests
for AuthCode Strategy can't handle custom callback uri. and inderiveConfig
you override auth config.My use is: I want to use the state parameter to do a custom logic during installation and I can only access it using custom redirect_uri and also need the session.
If I could have
This available in remix would make life easier.
Actual behavior
What actually happens?
Steps to reproduce the problem
[shopify-app/DEBUG] Authenticate returned a response
with a 302Debug logs
it throws a 302 response error because it tries to ensureAppIsInstalled but it already is my guess.
The text was updated successfully, but these errors were encountered: