Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Latest commit

 

History

History
31 lines (18 loc) · 684 Bytes

buildEmbeddedAppUrl.md

File metadata and controls

31 lines (18 loc) · 684 Bytes

shopify.auth.buildEmbeddedAppUrl

Constructs the redirection URL for getEmbeddedAppUrl based on the given host.

This utility relies on the host query param being a Base 64 encoded string. All requests from Shopify should include this param in the correct format.

Example

app.get('/redirect/endpoint', (req, res) => {
  const redirectURL = shopify.auth.buildEmbeddedAppUrl(req.query.host);

  res.redirect(redirectURL);
});

Parameters

host

string | ❗ required

The host parameter from the Shopify request.

Return

string

The appropriate Shopify address to redirect to.

Back to shopify.auth