Skip to content

How to redirect to a resource in Shopify Admin #2166

Open
@nboliver-ventureweb

Description

@nboliver-ventureweb

Using the redirect function returned from authenticate.admin, it does not seem possible to redirect to a resource in the Shopify Admin (outside the embedded app).

Example use case in an action:

export const action = async ({ request, params }: ActionFunctionArgs) => {
  const { admin, redirect } = await authenticate.admin(request);
  ...
  return redirect('shopify://admin/discounts');
});

This example doesn't work, and the current route just reloads. How can this be achieved?

There is another old issue on this topic (#705), but it does not answer the question of redirecting to a resource in the admin, only to an external URL or an app route.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions